-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (54 loc) · 1.54 KB
/
compile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Compile
on: [push, pull_request]
jobs:
test:
name: Compile (${{ matrix.sys }})
runs-on: windows-latest
strategy:
matrix:
include:
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }
- { sys: ucrt64, env: ucrt-x86_64 }
- { sys: clang64, env: clang-x86_64 }
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
cache: true
msystem: ${{ matrix.sys }}
install: >-
mingw-w64-${{ matrix.env }}-toolchain
mingw-w64-${{ matrix.env }}-clang
mingw-w64-${{ matrix.env }}-make
make
- name: Add environment variables
run: |
echo "export PATH=/${{ matrix.sys }}/bin:$PATH" >> $GITHUB_ENV
echo "export CC=clang" >> $GITHUB_ENV
echo "export CXX=clang++" >> $GITHUB_ENV
- name: Compile source code
run: |
echo "::group::Clang++ version"
clang++ --version
echo "::endgroup::"
echo "::group::Compiling"
make
echo "::endgroup::"
- name: Export artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-${{ matrix.env }}
path: |
./transf_server.exe
./transf_client.exe
if-no-files-found: warn
retention-days: 30