-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.18 KB
/
build.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
name: Build
on: [push]
jobs:
build:
name: Build project
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
steps:
- name: Chceckout code
uses: actions/checkout@v2
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Create build dir
run: mkdir build
- name: Cache CMake files
uses: actions/cache@v2
with:
path: build
key: ${{ runner.os }}-cmake---${{ hashFiles('*') }}
restore-keys: ${{ runner.os }}-cmake---
- name: Build
if: runner.os != 'Windows'
run: |
cd build
cmake -G Ninja ..
cmake --build . --config Debug
- name: Build
if: runner.os == 'Windows'
run: |
cd build
cmake ..
cmake --build . --config Debug
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: von-neumann-${{ runner.os }}
path: ./bin/*
- name: Run tests
# TODO: cmake target
if: runner.os == 'Linux'
run: |
cd bin
./von_neumann_test