Increment build number from 6 to 7 #184
This file contains hidden or 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" | |
| paths: | |
| - "recipes/**" | |
| pull_request: | |
| paths: | |
| - "recipes/**" | |
| jobs: | |
| build_recipes: | |
| runs-on: ubuntu-latest | |
| env: | |
| FORCE_COLOR: 1 | |
| TARGET_PLATFORM: emscripten-wasm32 | |
| GITHUB_OWNER: "emscripten-forge" | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| ################################################################ | |
| # SETUP | |
| ################################################################ | |
| - name: Checkout repo | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: apt-install playwright dependencies | |
| run: | | |
| sudo apt-get update -y && sudo apt-get install -y \ | |
| libwoff1 libvpx9 libevent-2.1-7t64 libopus0 libgstreamer-plugins-base1.0-0 \ | |
| libgstreamer-gl1.0-0 \ | |
| libgstreamer-plugins-bad1.0-0 \ | |
| libflite1 \ | |
| libavif16 \ | |
| libharfbuzz-icu0 \ | |
| libsecret-1-0 \ | |
| libhyphen0 \ | |
| libmanette-0.2-0 \ | |
| libgles2 \ | |
| gstreamer1.0-libav \ | |
| libgtk-4-1 | |
| ################################################################ | |
| # CONFIG | |
| ################################################################ | |
| - name: Global config | |
| shell: bash -el {0} | |
| run: git config --global advice.detachedHead false | |
| ################################################################ | |
| # MAMBA | |
| ################################################################ | |
| - name: Install micromamba | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-file: ci_env.yml | |
| init-shell: bash | |
| cache-environment: false | |
| post-cleanup: "all" | |
| ################################################################ | |
| # 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 prefix channel | |
| if: (github.event_name == 'push' && github.repository == 'emscripten-forge/recipes') | |
| shell: bash -l {0} | |
| env: | |
| PREFIX_DEV_API_KEY: ${{ secrets.PREFIX_DEV_API_KEY }} | |
| run: | | |
| overall_success=true | |
| # Loop over {emscripten-wasm32, linux-64, noarch} | |
| for platform in emscripten-wasm32 linux-64 noarch; do | |
| if [ -d "${GITHUB_WORKSPACE}/output/${platform}" ]; then | |
| cd "${GITHUB_WORKSPACE}/output/${platform}" | |
| files=$(ls *.tar.bz2 2> /dev/null) | |
| if [ -n "$files" ]; then | |
| for package in $files; do | |
| echo "Uploading ${package} for ${platform}" | |
| rattler-build upload prefix \ | |
| --channel emscripten-forge-dev \ | |
| -a $PREFIX_DEV_API_KEY \ | |
| ${package} | |
| RETURNCODE=$? | |
| # Check the RETURN CODE | |
| if [[ $RETURNCODE -eq 0 ]]; then | |
| echo "Upload succeeded for ${package} on ${platform}" | |
| else | |
| echo "Error: Upload failed with HTTP status $HTTP_STATUS" | |
| echo "Response Body: $RESPONSE" | |
| overall_success=false | |
| fi | |
| done | |
| fi | |
| fi | |
| done | |
| # Check if all uploads were successful | |
| if [ "$overall_success" = false ]; then | |
| echo "One or more uploads failed" | |
| exit 1 | |
| else | |
| echo "All uploads completed successfully" | |
| fi |