forked from nianticlabs/spz
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (61 loc) · 1.78 KB
/
Copy pathtest.yml
File metadata and controls
76 lines (61 loc) · 1.78 KB
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
name: Test
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.os }} with BUILD_SHARED_LIBS=${{matrix.shared}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
shared: [ON, OFF]
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest'
- name: Support longpaths
run: git config --system core.longpaths true
if: matrix.os == 'windows-latest'
- uses: mamba-org/setup-micromamba@v2
with:
init-shell: bash
environment-file: .github/environment.yml
environment-name: "build"
- name: Setup
shell: bash -l {0}
run: |
mkdir build
- name: CMake
shell: bash -l {0}
env:
BUILD_SHARED_LIBS: ${{ matrix.shared }}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
export CC=cl.exe
export CXX=cl.exe
fi
cmake -G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS \
-DBUILD_TESTING=ON \
-DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON \
..
working-directory: ./build
- name: Compile
shell: bash -l {0}
run: |
ninja
working-directory: ./build
- name: Install
shell: bash -l {0}
run: |
ninja install
working-directory: ./build
- name: "There are no tests :spoon:"
shell: bash -l {0}
run: |
echo "There are no tests"
working-directory: ./build