ccache fixes #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build conda package | |
on: | |
push: | |
branches: | |
- main | |
- v2 | |
paths-ignore: | |
- README.md | |
- LICENSE | |
- benchmarks/** | |
jobs: | |
conda-build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository (v1) | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
path: v1/ | |
- name: Checkout repository (v2) | |
uses: actions/checkout@v4 | |
with: | |
ref: v2 | |
path: v2/ | |
- name: Setup conda-forge channel | |
run: conda config --add channels conda-forge | |
- name: Install conda-build and conda-verify | |
run: $CONDA/bin/conda install --yes conda-build conda-verify --name base | |
- name: Create output directory | |
run: mkdir build | |
- name: Set environment variables | |
run: | | |
echo "CONDA_BLD_PATH=$HOME/conda-bld" >>"$GITHUB_ENV" | |
echo "CCACHE_DIR=$HOME/.ccache" >>"$GITHUB_ENV" | |
echo "CCACHE_BASEDIR=$HOME/conda-bld" >>"$GITHUB_ENV" | |
- name: Cache CCACHE_DIR | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ccache-${{ github.run_id }} | |
restore-keys: | | |
ccache- | |
- name: Build conda packages | |
run: $CONDA/bin/conda build --no-anaconda-upload --output-folder build v1/recipe v2/recipe | |
- name: Upload conda packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: conda-packages | |
path: build/ | |
deploy-github-pages: | |
needs: conda-build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download conda packages | |
uses: actions/download-artifact@v4 | |
with: | |
name: conda-packages | |
path: repo/ | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./ | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |