@@ -3,32 +3,49 @@ name: CI
3
3
on :
4
4
push :
5
5
pull_request :
6
+ workflow_dispatch : {}
6
7
7
8
jobs :
8
9
build :
9
- runs-on : ${{ matrix.os }}
10
+ runs-on : ${{ matrix.os[0] }}
10
11
strategy :
11
12
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 :
15
20
- uses : actions/checkout@v4
16
21
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
+
17
31
- name : Compile native versions
18
32
run : |
19
- make --debug
33
+ make -j $(getconf _NPROCESSORS_ONLN) clean
34
+ make -j $(getconf _NPROCESSORS_ONLN) all
20
35
21
36
- name : Get short SHA
22
37
id : slug
23
38
run : |
24
39
echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
25
40
26
41
- 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
28
43
29
- - uses : actions/upload-artifact@v4
44
+ - name : Upload artefacts
45
+ if : matrix.os[0] != 'windows-latest'
46
+ uses : actions/upload-artifact@v4
30
47
with :
31
- name : ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}
48
+ name : ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os[0] }}
32
49
path : |
33
50
*tar.gz
34
51
@@ -41,11 +58,13 @@ jobs:
41
58
42
59
- name : Compile windows version with cross-compilator
43
60
run : |
44
- make -f Makefile.mingw32 --trace
61
+ make -j $(getconf _NPROCESSORS_ONLN) --trace clean
62
+ make -j $(getconf _NPROCESSORS_ONLN) --trace all
45
63
46
64
- name : Get short SHA
47
65
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
49
68
50
69
- name : Create tar archive
51
70
run : tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest.tar.gz bin
0 commit comments