Skip to content

Commit

Permalink
Update CI, adding MacOS ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy authored May 6, 2024
1 parent 0b5b97a commit 9440e61
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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'
Expand Down

0 comments on commit 9440e61

Please sign in to comment.