From c46209d6b5a6a8fe90599a9087cf0494937bcb13 Mon Sep 17 00:00:00 2001 From: RblSb Date: Sat, 10 Feb 2024 13:10:44 +0300 Subject: [PATCH] separate job --- .github/workflows/main.yml | 50 ++++++++++++++++++------- extra/github-actions/build-mac.yml | 2 +- extra/github-actions/test-mac.yml | 14 +++---- extra/github-actions/workflows/main.yml | 34 ++++++++++++++--- 4 files changed, 74 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 454e6d9b005..537b32843ed 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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) @@ -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}} @@ -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: | @@ -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: | diff --git a/extra/github-actions/build-mac.yml b/extra/github-actions/build-mac.yml index 250657d29d7..0d2b23bdb12 100644 --- a/extra/github-actions/build-mac.yml +++ b/extra/github-actions/build-mac.yml @@ -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) diff --git a/extra/github-actions/test-mac.yml b/extra/github-actions/test-mac.yml index 33bdfb851c4..f462f75c393 100644 --- a/extra/github-actions/test-mac.yml +++ b/extra/github-actions/test-mac.yml @@ -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: | diff --git a/extra/github-actions/workflows/main.yml b/extra/github-actions/workflows/main.yml index 640d249f2e8..d5688b3e83a 100644 --- a/extra/github-actions/workflows/main.yml +++ b/extra/github-actions/workflows/main.yml @@ -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}} @@ -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