Skip to content

pre-commit: run on all (including txx files) #418

pre-commit: run on all (including txx files)

pre-commit: run on all (including txx files) #418

Workflow file for this run

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