-
-
Notifications
You must be signed in to change notification settings - Fork 243
67 lines (54 loc) · 1.68 KB
/
ci.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
61
62
63
64
65
66
67
name: CI
on: [push, pull_request]
jobs:
build_and_test:
name: Build & test
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
configuration: [release, debug]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
with:
submodules: recursive
- name: Setup premake
uses: abel0b/setup-premake@v1
# Install libsodium from apt
- name: Setup (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get install libsodium-dev
# Install libsodium from brew
- name: Setup (MacOS)
if: runner.os == 'MacOS'
run: brew install libsodium
# Build with premake + make
- name: Build (gmake)
if: runner.os != 'Windows'
run: |
premake5 gmake
make clean
make all config=${{ matrix.configuration }}
# Run the tests with sh syntax
- name: Test (gmake)
if: runner.os != 'Windows'
run: ./bin/test
## Windows-specific build steps
# Set up PATH variables to point to MSBuild from at least VS 16.1 (2019)
- name: Setup (vs2019)
if: runner.os == 'Windows'
uses: microsoft/[email protected]
with:
vs-version: '16.1.0'
# Build with premake + msbuild
- name: Build (vs2019)
if: runner.os == 'Windows'
run: |
premake5 vs2019
msbuild yojimbo.sln -nologo -m -t:Clean -p:Configuration=${{ matrix.configuration }}
msbuild yojimbo.sln -nologo -m -p:Configuration=${{ matrix.configuration }}
# Run the tests with Powershell syntax
- name: Test (vs2019)
if: runner.os == 'Windows'
run: "& ./bin/${{ matrix.configuration }}/test.exe"