Skip to content

Commit

Permalink
ci: Fix ccache env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisv committed Jan 9, 2024
1 parent ee173c1 commit 75d1f1b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conda/environment_macos_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies:
- numpy
- pkg-config
- boost
- cmake
- ccache
- cxx-compiler
- ninja
36 changes: 19 additions & 17 deletions .github/workflows/macos-linux-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} ${{ matrix.cxx_options }}
runs-on: ${{ matrix.os }}
env:
ccache_basedir: "${github_workspace}"
ccache_dir: "${github_workspace}/.ccache"
ccache_compress: true
ccache_compresslevel: 6
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6

strategy:
fail-fast: false
Expand All @@ -33,6 +33,12 @@ jobs:
with:
submodules: recursive

- uses: actions/cache@v3
with:
path: .ccache
key: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ github.sha }}
restore-keys: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-

- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: eigenpy
Expand All @@ -41,12 +47,6 @@ jobs:
python-version: ${{ matrix.python-version }}
auto-activate-base: false

- uses: actions/cache@v3
with:
path: .ccache
key: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ github.sha }}
restore-keys: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-

- name: Build EigenPy
shell: bash -el {0}
run: |
Expand All @@ -57,23 +57,23 @@ jobs:
cd build
cmake .. \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DPYTHON_EXECUTABLE=$(which python3) \
-DGENERATE_PYTHON_STUBS=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS=${{ matrix.cxx_options }}
make
make build_tests
export CTEST_OUTPUT_ON_FAILURE=1
make test
make install
cmake --build .
ctest --output-on-failure
cmake --install .
- name: Test packaging
shell: bash -el {0}
run: |
cmake -B test-packaging \
-S unittest/packaging/cmake \
-G "Ninja" \
-DPYTHON_EXECUTABLE=$(which python3)
- name: Configure hpp-fcl
Expand All @@ -84,15 +84,17 @@ jobs:
git clone https://github.com/humanoid-path-planner/hpp-fcl.git --recursive
cd hpp-fcl
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
cmake .. \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE=$(which python3)
- name: Uninstall EigenPy
shell: bash -el {0}
run: |
cd build
make uninstall
cmake --build . --target uninstall
check:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
build:
runs-on: ${{ matrix.os }}
env:
ccache_basedir: "${github_workspace}"
ccache_dir: "${github_workspace}/.ccache"
ccache_compress: true
ccache_compresslevel: 6
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6

strategy:
fail-fast: false
Expand Down

0 comments on commit 75d1f1b

Please sign in to comment.