forked from rogersce/cnpy
-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (55 loc) · 2.05 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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
preset: [gcc-debug, gcc-asan, gcc-ubsan, gcc-tsan, gcc-release, gcc-profile, gcc-ofast, gcc-memory-opt, gcc-lto, gcc-ofast-lto, gcc-memory-opt-lto, gcc-ofast-memory-opt-lto, clang-asan, clang-ubsan, clang-tsan, clang-coverage, clang-release, clang-profile, clang-ofast, clang-memory-opt, clang-lto, clang-ofast-lto, clang-memory-opt-lto, clang-ofast-memory-opt-lto]
steps:
- name: Install gcc-11
run: |
sudo apt update
sudo apt install gcc-11 g++-11
- name: Install clang-12
run: |
sudo apt update
sudo apt install clang-12
- name: Checkout
uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
git config --file .gitmodules --get-regexp url | while read url; do
git config --file=.gitmodules $(echo "$url" | sed -E "s/git@github.com:|https:\/\/github.com\//https:\/\/${{ secrets.CI_PAT }}:${{ secrets.CI_PAT }}@github.com\//")
done
git submodule init
git submodule update --init --recursive
- name: Install cmake
run: |
sudo apt update
sudo apt install cmake
- name: Install ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Install gtest
run: sudo apt-get install libgtest-dev
- name: Install zlib
run: sudo apt-get install zlib1g zlib1g-dev
- name: Cmake
run: |
cd ${{runner.workspace}}/NpyCpp
cp ${{runner.workspace}}/NpyCpp/cmake/CMakePresets.json ${{runner.workspace}}/NpyCpp/CMakePresets.json
cmake . --preset=${{matrix.preset}}
- name: Build
run: |
cd ${{runner.workspace}}/NpyCpp/cmake-build-${{matrix.preset}}
ninja
- name: Test
run: |
cd ${{runner.workspace}}/NpyCpp/cmake-build-${{matrix.preset}}
ninja build_and_test