Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
DerThorsten authored May 12, 2024
2 parents 1600c64 + 08b6827 commit 1948f0b
Show file tree
Hide file tree
Showing 274 changed files with 6,756 additions and 6,537 deletions.
91 changes: 0 additions & 91 deletions .github/workflows/build_all.yaml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: docs

on:
workflow_dispatch:
push:
pull_request:

jobs:

build_docs:
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

################################################################
# CONFIG
################################################################
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.1
- run: |
pixi run docs-build -d docs_build
################################################################
# upload to github pages
################################################################
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs_build

deploy:
# only run on main branch
if: github.ref == 'refs/heads/main' && github.repository == 'emscripten-forge/recipes'

# Add a dependency to the build job
needs: build_docs

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read # to read the Pages artifact
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3 # or specific "vX.X.X" version tag for this action
120 changes: 35 additions & 85 deletions .github/workflows/build_recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,140 +18,90 @@ jobs:
emsdk_ver: ["3.1.45"]

steps:
################################################################
# SETUP
################################################################
- name: Checkout repo
uses: actions/checkout@v2
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
- name: Delete fortran
run: sudo apt-get remove gfortran -y

################################################################
# CONFIG
################################################################
- name: global config
- name: Global config
shell: bash -el {0}
run: |
git config --global advice.detachedHead false
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME
cp $GITHUB_WORKSPACE/conda_build_config.yaml $HOME
run: git config --global advice.detachedHead false

################################################################
# MAMBA
################################################################
- uses: mamba-org/setup-micromamba@v1
- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci_env.yml
environment-name: ci
init-shell: >-
bash
init-shell: bash
cache-environment: true
post-cleanup: 'all'

################################################################
# setup emsdk
################################################################
- name: "setup emsdk"
shell: bash -el {0}
run: |
./emsdk/setup_emsdk.sh ${{ matrix.emsdk_ver }} $(pwd)/emsdk_install
################################################################
# POST ENV INSTALL CONFIG
# EMSDK
################################################################
- name: post env install config
- name: Setup emsdk
shell: bash -el {0}
run: |
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME/.condarc
playwright install
./emsdk/setup_emsdk.sh ${{ matrix.emsdk_ver }} $(pwd)/emsdk_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"
# POST ENV INSTALL CONFIG
################################################################
- name: "install custom non-master dependencies"
- name: Post env install config
shell: bash -el {0}
run: |
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api_v2 --no-deps --ignore-installed
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME
cp $GITHUB_WORKSPACE/conda_build_config.yaml $HOME
################################################################
# run pytests
# PUSH
################################################################
- name: "test config files"
shell: bash -el {0}
run: |
cd testing
pytest test_empack_config.py
# ################################################################
# # build pyjs
# ################################################################
# - name: "build package"
# shell: bash -el {0}
# run: |
# cd ${GITHUB_WORKSPACE}
# python builder.py build explicit $GITHUB_WORKSPACE/recipes/recipes/emscripten_emscripten-wasm32
# python builder.py build explicit $GITHUB_WORKSPACE/recipes/recipes_emscripten/pyjs --emscripten-wasm32


################################################################
# build recipes with changes PUSH
################################################################
- name: "build packages push"
- name: Build recipes with changes PUSH
shell: bash -el {0}
if: github.event_name == 'push'
run: |
cd ${GITHUB_WORKSPACE}
python builder.py build changed $GITHUB_WORKSPACE/ origin/main~1 origin/main
python -m emci build changed $GITHUB_WORKSPACE/ origin/main~1 origin/main --n-retry=3
################################################################
# build recipes with changes PULL_REQUEST
# PULL_REQUEST
################################################################
- name: "build packages pull_request"
- name: Build recipes with changes PULL_REQUEST
shell: bash -el {0}
if: github.event_name == 'pull_request'
run: |
cd ${GITHUB_WORKSPACE}
python builder.py build changed $GITHUB_WORKSPACE/ origin/main HEAD
python -m emci build changed $GITHUB_WORKSPACE/ origin/main HEAD --n-retry=3
################################################################
# quetz upload packages
# UPLOAD
################################################################
- name: "quetz upload packages"
if: github.event_name == 'push'
- 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
if [ $(ls ${CONDA_PREFIX}/conda-bld/emscripten-wasm32/*.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-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 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
# loop over {emscripten-wasm32, linux-64, noarch}
for platform in emscripten-wasm32 linux-64 noarch; do
mkdir -p ${GITHUB_WORKSPACE}/output/${platform}
for package in $(ls ${GITHUB_WORKSPACE}/output/${platform}/*.tar.bz2); do
echo "Uploading ${package} for ${platform} (build with rattler)"
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${package}
done
done
Loading

0 comments on commit 1948f0b

Please sign in to comment.