cpp-expected #1666
Workflow file for this run
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 recipes | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
jobs: | |
build_recipes: | |
runs-on: ubuntu-latest | |
env: | |
TARGET_PLATFORM: emscripten-32 | |
GITHUB_OWNER: "emscripten-forge" | |
strategy: | |
fail-fast: false | |
matrix: | |
emsdk_ver: ["3.1.27"] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Maximize build space | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: delete fortran... | |
run: | | |
sudo apt-get remove gfortran -y | |
################################################################ | |
# CONFIG | |
################################################################ | |
- name: global config | |
shell: bash -l {0} | |
run: | | |
git config --global advice.detachedHead false | |
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME | |
cp $GITHUB_WORKSPACE/conda_build_config.yaml $HOME | |
################################################################ | |
# MAMBA | |
################################################################ | |
- name: install mamba | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-file: ci_env.yml | |
environment-name: ci-env | |
micromamba-version: '0.23.2' | |
################################################################ | |
# POST ENV INSTALL CONFIG | |
################################################################ | |
- name: post env install config | |
shell: bash -l {0} | |
run: | | |
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME/.condarc | |
micromamba activate ci-env | |
playwright install | |
################################################################ | |
# setup emsdk | |
################################################################ | |
- name: "setup emsdk" | |
shell: bash -l {0} | |
run: | | |
micromamba activate ci-env | |
git clone https://github.com/emscripten-core/emsdk.git | |
cd emsdk | |
./emsdk install ${{ matrix.emsdk_ver }} | |
./emsdk activate ${{ matrix.emsdk_ver }} | |
echo $(pwd)/emsdk-${{ matrix.emsdk_ver }} | |
echo $(pwd) > $HOME/.emsdkdir | |
################################################################ | |
# install / clone custom non-master things | |
# for pip, we use --no-deps --ignore-installed | |
# and make sure that all dependencies are already contained | |
# in the conda env named "ci-env" | |
################################################################ | |
- name: "install custom non-master dependencies" | |
shell: bash -l {0} | |
run: | | |
micromamba activate ci-env | |
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api --no-deps --ignore-installed | |
################################################################ | |
# run pytests | |
################################################################ | |
- name: "test config files" | |
shell: bash -l {0} | |
run: | | |
micromamba activate ci-env | |
cd testing | |
pytest | |
################################################################ | |
# build recipes with changes PUSH | |
################################################################ | |
- name: "build packages push" | |
shell: bash -l {0} | |
if: github.event_name == 'push' | |
run: | | |
micromamba activate ci-env | |
cd ${GITHUB_WORKSPACE} | |
python builder.py build changed $GITHUB_WORKSPACE/ origin/main~1 origin/main | |
################################################################ | |
# build recipes with changes PULL_REQUEST | |
################################################################ | |
- name: "build packages pull_request" | |
shell: bash -l {0} | |
if: github.event_name == 'pull_request' | |
run: | | |
micromamba activate ci-env | |
cd ${GITHUB_WORKSPACE} | |
python builder.py build changed $GITHUB_WORKSPACE/ origin/main HEAD | |
################################################################ | |
# quetz upload packages | |
################################################################ | |
- name: "quetz upload packages" | |
if: github.event_name == 'push' | |
shell: bash -l {0} | |
run: | | |
mkdir -p ${CONDA_PREFIX}/conda-bld/emscripten-32 | |
mkdir -p ${CONDA_PREFIX}/conda-bld/linux-64 | |
mkdir -p ${CONDA_PREFIX}/conda-bld/noarch | |
if [ $(ls ${CONDA_PREFIX}/conda-bld/emscripten-32/*.tar.bz2 | wc -l) -ne 0 ]; then | |
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/emscripten-32/*.tar.bz2 | |
fi | |
if [ $(ls ${CONDA_PREFIX}/conda-bld/linux-64/*.tar.bz2 | wc -l) -ne 0 ]; then | |
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/linux-64/*.tar.bz2 | |
fi | |
if [ $(ls ${CONDA_PREFIX}/conda-bld/noarch/*.tar.bz2 | wc -l) -ne 0 ]; then | |
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/noarch/*.tar.bz2 | |
fi | |