Browse Source

[ci] Specify macOS runner versions instead of using macos-latest. (#11645)

* [ci] Specify macOS runner versions instead of using macos-latest.

Use `runner.arch` to decide where to upload the macOS artifacts.

* [ci] Use macos-13 for tests.
Zeta 1 year ago
parent
commit
d4fe4e69da

+ 4 - 4
.github/workflows/main.yml

@@ -582,7 +582,7 @@ jobs:
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
-        os: [macos-latest, macos-14]
+        os: [macos-14, macos-13]
     runs-on: ${{ matrix.os }}
     runs-on: ${{ matrix.os }}
     env:
     env:
       PLATFORM: mac${{ matrix.os == 'macos-14' && '-arm64' || '' }}
       PLATFORM: mac${{ matrix.os == 'macos-14' && '-arm64' || '' }}
@@ -677,14 +677,14 @@ jobs:
           otool -L ./haxelib
           otool -L ./haxelib
 
 
       - name: Upload artifact (x64)
       - name: Upload artifact (x64)
-        if: matrix.os == 'macos-latest'
+        if: runner.arch == 'X64'
         uses: actions/upload-artifact@v4
         uses: actions/upload-artifact@v4
         with:
         with:
           name: macX64Binaries
           name: macX64Binaries
           path: out
           path: out
 
 
       - name: Upload artifact (arm)
       - name: Upload artifact (arm)
-        if: matrix.os == 'macos-14'
+        if: runner.arch == 'ARM64'
         uses: actions/upload-artifact@v4
         uses: actions/upload-artifact@v4
         with:
         with:
           name: macArmBinaries
           name: macArmBinaries
@@ -919,7 +919,7 @@ jobs:
 
 
   mac-test:
   mac-test:
     needs: mac-build-universal
     needs: mac-build-universal
-    runs-on: macos-latest
+    runs-on: macos-13
     env:
     env:
       PLATFORM: mac
       PLATFORM: mac
       TEST: ${{matrix.target}}
       TEST: ${{matrix.target}}

+ 2 - 2
extra/github-actions/build-mac.yml

@@ -56,14 +56,14 @@
     otool -L ./haxelib
     otool -L ./haxelib
 
 
 - name: Upload artifact (x64)
 - name: Upload artifact (x64)
-  if: matrix.os == 'macos-latest'
+  if: runner.arch == 'X64'
   uses: actions/upload-artifact@v4
   uses: actions/upload-artifact@v4
   with:
   with:
     name: macX64Binaries
     name: macX64Binaries
     path: out
     path: out
 
 
 - name: Upload artifact (arm)
 - name: Upload artifact (arm)
-  if: matrix.os == 'macos-14'
+  if: runner.arch == 'ARM64'
   uses: actions/upload-artifact@v4
   uses: actions/upload-artifact@v4
   with:
   with:
     name: macArmBinaries
     name: macArmBinaries

+ 2 - 2
extra/github-actions/workflows/main.yml

@@ -332,7 +332,7 @@ jobs:
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
-        os: [macos-latest, macos-14]
+        os: [macos-14, macos-13]
     runs-on: ${{ matrix.os }}
     runs-on: ${{ matrix.os }}
     env:
     env:
       PLATFORM: mac${{ matrix.os == 'macos-14' && '-arm64' || '' }}
       PLATFORM: mac${{ matrix.os == 'macos-14' && '-arm64' || '' }}
@@ -443,7 +443,7 @@ jobs:
 
 
   mac-test:
   mac-test:
     needs: mac-build-universal
     needs: mac-build-universal
-    runs-on: macos-latest
+    runs-on: macos-13
     env:
     env:
       PLATFORM: mac
       PLATFORM: mac
       TEST: ${{matrix.target}}
       TEST: ${{matrix.target}}