-
Notifications
You must be signed in to change notification settings - Fork 5
77 lines (75 loc) · 2.81 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
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
cmake-args:
- -DCMAKE_BUILD_TYPE=Debug -DSINTER_DEBUG_LOGLEVEL=2 -DSINTER_DEBUG_MEMORY_CHECK=1 -DSINTER_COVERAGE=1
- -DCMAKE_BUILD_TYPE=Debug -DSINTER_DEBUG_LOGLEVEL=2 -DSINTER_DEBUG_MEMORY_CHECK=1
- -DCMAKE_BUILD_TYPE=Debug -DSINTER_DEBUG_LOGLEVEL=2 -DSINTER_DEBUG_MEMORY_CHECK=1 -DSINTER_TEST_SHORT_DOUBLE=1
- -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Debug -DSINTER_DEBUG_LOGLEVEL=2 -DSINTER_DEBUG_MEMORY_CHECK=1
- -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Debug -DSINTER_DEBUG_LOGLEVEL=2 -DSINTER_DEBUG_MEMORY_CHECK=1 -DSINTER_TEST_SHORT_DOUBLE=1
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_BUILD_TYPE=Release -DSINTER_TEST_SHORT_DOUBLE=1
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: install cpp-coveralls
run: pip install --user cpp-coveralls
if: github.event_name != 'pull_request' && contains(matrix.cmake-args, 'coverage')
- name: mkdir
run: mkdir build
- name: cmake
working-directory: build
run: cmake .. ${{ matrix.cmake-args }}
- name: make
working-directory: build
run: make -j4
- name: Run tests
working-directory: build
run: make CTEST_PARALLEL_LEVEL=$(nproc) CTEST_OUTPUT_ON_FAILURE=1 test
- name: Check coverage
working-directory: build
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRAVIS_JOB_ID: ${{ github.run_id }}
run: ~/.local/bin/cpp-coveralls -r .. --include vm --include runner --gcov-options '\-lp' -y ../.coveralls.yml
if: github.event_name != 'pull_request' && contains(matrix.cmake-args, 'coverage')
check-headers:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check if headers work in C++
working-directory: vm/include
run: g++ -std=c++11 -fsyntax-only sinter/*.h sinter.h -I. -Wall -Wextra -pedantic
web-demo:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies (apt)
run: |
sudo apt-get update && \
sudo apt-get install -y --no-install-recommends \
libxi-dev libgl1-mesa-dev
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: ./devices/wasm/web/yarn.lock
- name: Install dependencies
working-directory: devices/wasm/web
run: yarn install --frozen-lockfile
- name: Lint
working-directory: devices/wasm/web
run: yarn lint