@@ -3,32 +3,49 @@ name: CI
33on :
44 push :
55 pull_request :
6+ workflow_dispatch : {}
67
78jobs :
89 build :
9- runs-on : ${{ matrix.os }}
10+ runs-on : ${{ matrix.os[0] }}
1011 strategy :
1112 matrix :
12- os : [macos-latest, ubuntu-latest]
13-
14- steps :
13+ os : [[macos-latest, bash], [ubuntu-latest, bash], [windows-latest, msys2]]
14+ fail-fast : false
15+ defaults :
16+ run :
17+ shell : ${{ matrix.os[1] }} {0}
18+
19+ steps :
1520 - uses : actions/checkout@v4
1621
22+ - name : Install MSYS2 packages
23+ if : matrix.os[0] == 'windows-latest'
24+ uses : msys2/setup-msys2@v2
25+ with :
26+ msystem : MINGW32
27+ install : |
28+ base-devel mingw-w64-i686-gcc
29+ update : true
30+
1731 - name : Compile native versions
1832 run : |
19- make --debug
33+ make -j $(getconf _NPROCESSORS_ONLN) clean
34+ make -j $(getconf _NPROCESSORS_ONLN) all
2035
2136 - name : Get short SHA
2237 id : slug
2338 run : |
2439 echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
2540
2641 - name : Create tar archive (keep executable bit)
27- run : tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}.tar.gz bin
42+ run : tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os[0] }}.tar.gz bin
2843
29- - uses : actions/upload-artifact@v4
44+ - name : Upload artefacts
45+ if : matrix.os[0] != 'windows-latest'
46+ uses : actions/upload-artifact@v4
3047 with :
31- name : ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}
48+ name : ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os[0] }}
3249 path : |
3350 *tar.gz
3451
@@ -41,11 +58,13 @@ jobs:
4158
4259 - name : Compile windows version with cross-compilator
4360 run : |
44- make -f Makefile.mingw32 --trace
61+ make -f Makefile.mingw32 -j $(getconf _NPROCESSORS_ONLN) clean
62+ make -f Makefile.mingw32 -j $(getconf _NPROCESSORS_ONLN) all
4563
4664 - name : Get short SHA
4765 id : slug
48- run : echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
66+ run : |
67+ echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
4968
5069 - name : Create tar archive
5170 run : tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest.tar.gz bin
0 commit comments