-
Notifications
You must be signed in to change notification settings - Fork 11
61 lines (50 loc) · 1.4 KB
/
linux.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
name: CI - Linux via CMake
on:
push:
pull_request:
workflow_call:
env:
PYTHONPATH: /builds/custom_install/lib/python3/dist-packages
jobs:
build:
runs-on: self-hosted
env:
CCACHE_DIR: /github/home/.ccache
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Setup ccache
uses: actions/cache@v3
with:
key: ${{ runner.os }}
path: ${{ env.CCACHE_DIR }}
# extract branch name
- name: Get branch name
if: github.event_name != 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
# extract branch name on pull request
- name: Get branch name (pull request)
if: github.event_name == 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV
- name: Build and install proxnlp
run: |
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=~/custom_install -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$(which python3)
make -j3 install
test:
needs: build
runs-on: self-hosted
env:
CTEST_OUTPUT_ON_FAILURE: 1
CTEST_PARALLEL_LEVEL: 4
steps:
- run: |
cd $GITHUB_WORKSPACE/build
pip install casadi --no-input
make test