Skip to content

Commit

Permalink
separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
RblSb committed Feb 10, 2024
1 parent 47287c6 commit 2f372ba
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 28 deletions.
50 changes: 36 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ jobs:
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v3
with:
name: macBinaries
name: macX64Binaries
path: out

- name: Upload artifact (arm)
Expand Down Expand Up @@ -658,9 +658,43 @@ jobs:
working-directory: ${{github.workspace}}/tests


mac-test:
mac-build-universal:
needs: mac-build
runs-on: macos-latest
steps:
- name: Checkout the repository
uses: actions/checkout@main
- uses: actions/download-artifact@v3
with:
name: macX64Binaries
path: macX64Binaries
- uses: actions/download-artifact@v3
with:
name: macArmBinaries
path: macArmBinaries

- name: Make universal binary
run: |
set -ex
tar -xf macX64Binaries/*_bin.tar.gz -C macX64Binaries --strip-components=1
tar -xf macArmBinaries/*_bin.tar.gz -C macArmBinaries --strip-components=1
lipo -create -output haxe macX64Binaries/haxe macArmBinaries/haxe
# there is only x64 haxelib
mv macX64Binaries/haxelib .
make -s package_unix package_installer_mac
ls -l out
otool -L ./haxe
otool -L ./haxelib
- name: Upload artifact (universal)
uses: actions/upload-artifact@v3
with:
name: macBinaries
path: out

mac-test:
needs: mac-build-universal
runs-on: macos-latest
env:
PLATFORM: mac
TEST: ${{matrix.target}}
Expand All @@ -681,10 +715,6 @@ jobs:
with:
name: macBinaries
path: macBinaries
- uses: actions/download-artifact@v3
with:
name: macArmBinaries
path: macArmBinaries

- name: Install Neko from S3
run: |
Expand All @@ -703,14 +733,6 @@ jobs:
- name: Print Neko version
run: neko -version 2>&1

- name: Make universal binary
run: |
set -ex
tar -xf macBinaries/*_bin.tar.gz -C macBinaries --strip-components=1
tar -xf macArmBinaries/*_bin.tar.gz -C macArmBinaries --strip-components=1
# mkdir ./macUniversalBinaries
lipo -create -output macBinaries/haxe macBinaries/haxe macArmBinaries/haxe
- name: Setup Haxe
run: |
# mkdir ./macBinaries
Expand Down
2 changes: 1 addition & 1 deletion extra/github-actions/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v3
with:
name: macBinaries
name: macX64Binaries
path: out

- name: Upload artifact (arm)
Expand Down
8 changes: 0 additions & 8 deletions extra/github-actions/test-mac.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
- name: Make universal binary
run: |
set -ex
tar -xf macBinaries/*_bin.tar.gz -C macBinaries --strip-components=1
tar -xf macArmBinaries/*_bin.tar.gz -C macArmBinaries --strip-components=1
# mkdir ./macUniversalBinaries
lipo -create -output macBinaries/haxe macBinaries/haxe macArmBinaries/haxe
- name: Setup Haxe
run: |
# mkdir ./macBinaries
Expand Down
40 changes: 35 additions & 5 deletions extra/github-actions/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,43 @@ jobs:
@import install-neko-windows.yml
@import test-windows.yml

mac-test:
mac-build-universal:
needs: mac-build
runs-on: macos-latest
steps:
- name: Checkout the repository
uses: actions/checkout@main
- uses: actions/download-artifact@v3
with:
name: macX64Binaries
path: macX64Binaries
- uses: actions/download-artifact@v3
with:
name: macArmBinaries
path: macArmBinaries

- name: Make universal binary
run: |
set -ex
tar -xf macX64Binaries/*_bin.tar.gz -C macX64Binaries --strip-components=1
tar -xf macArmBinaries/*_bin.tar.gz -C macArmBinaries --strip-components=1
lipo -create -output haxe macX64Binaries/haxe macArmBinaries/haxe
# there is only x64 haxelib
mv macX64Binaries/haxelib .
make -s package_unix package_installer_mac
ls -l out
otool -L ./haxe
otool -L ./haxelib
- name: Upload artifact (universal)
uses: actions/upload-artifact@v3
with:
name: macBinaries
path: out

mac-test:
needs: mac-build-universal
runs-on: macos-latest
env:
PLATFORM: mac
TEST: ${{matrix.target}}
Expand All @@ -385,10 +419,6 @@ jobs:
with:
name: macBinaries
path: macBinaries
- uses: actions/download-artifact@v3
with:
name: macArmBinaries
path: macArmBinaries

@import install-neko-unix.yml
@import test-mac.yml
Expand Down

0 comments on commit 2f372ba

Please sign in to comment.