From 9440e61c87086596385a186c0ffc68493e21f8b7 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Mon, 6 May 2024 11:45:32 +0200 Subject: [PATCH] Update CI, adding MacOS ARM --- .github/workflows/compilation.yml | 46 +++++++++++++++++++------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 3a3e715..fb6542c 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -6,13 +6,18 @@ on: jobs: build: - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os[0] }} strategy: matrix: - os: [macos-latest, ubuntu-latest] + os: [ + [macos-latest, arm64], + [macos-13, x86_64], + [ubuntu-latest, x86_64], + [windows-latest, x86_64] + ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Compile native versions run: | @@ -23,11 +28,11 @@ jobs: run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" - name: Create tar archive (keep executable bit) - run: tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}.tar.gz bin + run: tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-${{ matrix.os[0] }}-${{ matrix.os[1] }}.tar.gz bin - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: - name: ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os}} + name: ps2client-${{ steps.slug.outputs.sha8 }}-${{ matrix.os[0] }}-${{ matrix.os[1] }} path: | *tar.gz @@ -36,7 +41,7 @@ jobs: container: dockcross/windows-static-x86:latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Compile windows version with cross-compilator run: | @@ -47,11 +52,11 @@ jobs: run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" - name: Create tar archive - run: tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest.tar.gz bin + run: tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest-x86_64.tar.gz bin - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: - name: ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest + name: ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest-x86_64 path: | *tar.gz @@ -60,26 +65,31 @@ jobs: runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Get short SHA id: slug run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" - - name: Download Mac artifact - uses: actions/download-artifact@v2 + - name: Download Mac x86_64 artifact + uses: actions/download-artifact@v4 with: - name: ps2client-${{ steps.slug.outputs.sha8 }}-macos-latest + name: ps2client-${{ steps.slug.outputs.sha8 }}-macos-13-x86_64 + + - name: Download Mac arm64 artifact + uses: actions/download-artifact@v4 + with: + name: ps2client-${{ steps.slug.outputs.sha8 }}-macos-latest-arm64 - name: Download Ubuntu artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - name: ps2client-${{ steps.slug.outputs.sha8 }}-ubuntu-latest + name: ps2client-${{ steps.slug.outputs.sha8 }}-ubuntu-latest-x86_64 - name: Download Windows artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: - name: ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest + name: ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest-x86_64 - name: Create pre-release if: github.ref == 'refs/heads/master'