Skip to content

WIP: Add tk

WIP: Add tk #2399

Workflow file for this run

name: build recipes
on:
push:
branches:
- 'main'
pull_request:
jobs:
build_recipes:
runs-on: ubuntu-latest
env:
TARGET_PLATFORM: emscripten-wasm32
GITHUB_OWNER: "emscripten-forge"
strategy:
fail-fast: false
matrix:
emsdk_ver: ["3.1.45"]
steps:
################################################################
# SETUP
################################################################
- name: Checkout repo
uses: actions/checkout@v4
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 -el {0}
run: git config --global advice.detachedHead false
################################################################
# MAMBA
################################################################
- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci_env.yml
environment-name: ci
init-shell: bash
cache-environment: true
post-cleanup: 'all'
################################################################
# EMSDK
################################################################
- name: Setup emsdk
shell: bash -el {0}
run: |
./emsdk/setup_emsdk.sh ${{ matrix.emsdk_ver }} $(pwd)/emsdk_install
################################################################
# POST ENV INSTALL CONFIG
################################################################
- name: Post env install config
shell: bash -el {0}
run: |
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME
cp $GITHUB_WORKSPACE/conda_build_config.yaml $HOME
playwright install
################################################################
# 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 boa
shell: bash -el {0}
run: |
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api_v2 --no-deps --ignore-installed
################################################################
# PUSH
################################################################
- name: Build recipes with changes PUSH
shell: bash -el {0}
if: github.event_name == 'push'
run: |
python -m emci build changed $GITHUB_WORKSPACE/ origin/main~1 origin/main
################################################################
# PULL_REQUEST
################################################################
- name: Build recipes with changes PULL_REQUEST
shell: bash -el {0}
if: github.event_name == 'pull_request'
run: |
python -m emci build changed $GITHUB_WORKSPACE/ origin/main HEAD
################################################################
# UPLOAD
################################################################
- name: Upload packages to Quetz
if: (github.event_name == 'push' && github.repository == 'emscripten-forge/recipes')
shell: bash -el {0}
run: |
mkdir -p ${CONDA_PREFIX}/conda-bld/emscripten-wasm32
mkdir -p ${CONDA_PREFIX}/conda-bld/linux-64
mkdir -p ${CONDA_PREFIX}/conda-bld/noarch
mkdir -p ${GITHUB_WORKSPACE}/output/emscripten-wasm32
mkdir -p ${GITHUB_WORKSPACE}/output/linux-64
mkdir -p ${GITHUB_WORKSPACE}/output/noarch
# packages build with boa
if [ $(ls ${CONDA_PREFIX}/conda-bld/emscripten-wasm32/*.tar.bz2 | wc -l) -ne 0 ]; then
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${CONDA_PREFIX}/conda-bld/emscripten-wasm32/*.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 -u https://beta.mamba.pm post_file_to_channel 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 -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${CONDA_PREFIX}/conda-bld/noarch/*.tar.bz2
fi
# packages build with rattler-build
if [ $(ls ${GITHUB_WORKSPACE}/output/emscripten-wasm32/*.tar.bz2 | wc -l) -ne 0 ]; then
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${GITHUB_WORKSPACE}/output/emscripten-wasm32/*.tar.bz2
fi
if [ $(ls ${GITHUB_WORKSPACE}/output/linux-64/*.tar.bz2 | wc -l) -ne 0 ]; then
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${GITHUB_WORKSPACE}/output/linux-64/*.tar.bz2
fi
if [ $(ls ${GITHUB_WORKSPACE}/output/noarch/*.tar.bz2 | wc -l) -ne 0 ]; then
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${GITHUB_WORKSPACE}/output/noarch/*.tar.bz2
fi