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 c46209d
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 26 deletions.
50 changes: 37 additions & 13 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,37 @@ jobs:
working-directory: ${{github.workspace}}/tests


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

- 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: Upload artifact (universal)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v3
with:
name: macBinaries
path: macBinaries

mac-test:
needs: mac-build-universal
runs-on: macos-latest
env:
PLATFORM: mac
TEST: ${{matrix.target}}
Expand All @@ -681,10 +709,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,13 +727,13 @@ 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: 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: |
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
14 changes: 7 additions & 7 deletions extra/github-actions/test-mac.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
- 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: 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: |
Expand Down
34 changes: 29 additions & 5 deletions extra/github-actions/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,37 @@ jobs:
@import install-neko-windows.yml
@import test-windows.yml

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

- 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: Upload artifact (universal)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v3
with:
name: macBinaries
path: macBinaries

mac-test:
needs: mac-build-universal
runs-on: macos-latest
env:
PLATFORM: mac
TEST: ${{matrix.target}}
Expand All @@ -385,10 +413,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 c46209d

Please sign in to comment.