From ac3e602bc50dda6820e50bc5e5a02d0a83a6e830 Mon Sep 17 00:00:00 2001 From: aliciaaevans Date: Tue, 2 Apr 2024 16:42:00 -0400 Subject: [PATCH] initial merge wf (set up for testing) --- .github/workflows/master-arm.yml | 79 ++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/master-arm.yml diff --git a/.github/workflows/master-arm.yml b/.github/workflows/master-arm.yml new file mode 100644 index 0000000000000..e8c2a42287aa1 --- /dev/null +++ b/.github/workflows/master-arm.yml @@ -0,0 +1,79 @@ +name: Upload +on: + push: + branches: + - target-for-arm-osx + +jobs: + build-upload-osx-arm: + name: osx-arm64 Upload + if: github.repository == 'bioconda/bioconda-recipes' + runs-on: macOS-14 # M1 + strategy: + fail-fast: false + max-parallel: 4 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # TODO: bail if there's no osx-arm64 recipes + # - run: + # name: Check for Additional Platforms + # command: ./.circleci/check-for-additional-platforms.sh "${CIRCLE_SHA1}~1 ${CIRCLE_SHA1}" "build_and_upload" + + - name: set path + run: echo "/opt/mambaforge/bin" >> $GITHUB_PATH + + - name: Fetch conda install script + run: | + wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{install-and-set-up-conda,configure-conda,common}.sh + + - name: Restore cache + id: cache + uses: actions/cache@v4 + with: + path: /opt/mambaforge + key: ${{ runner.os }}--master--${{ hashFiles('install-and-set-up-conda.sh', 'common.sh', 'configure-conda.sh') }} + + - name: Set up bioconda-utils + if: steps.cache.outputs.cache-hit != 'true' + run: bash install-and-set-up-conda.sh + + # This script can be used to reconfigure conda to use the right channel setup. + # This has to be done after the cache is restored, because + # the channel setup is not cached as it resides in the home directory. + # We could use a system-wide (and therefore cached) channel setup, + # but mamba does not support that at the time of implementation + # (it ignores settings made with --system). + - name: Configure conda + run: bash configure-conda.sh + + - name: Build and Upload + env: + QUAY_LOGIN: ${{ secrets.QUAY_LOGIN }} + QUAY_OAUTH_TOKEN: ${{ secrets.QUAY_OAUTH_TOKEN }} + ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} + INVOLUCRO_AUTH: ${{ secrets.INVOLUCRO_AUTH }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Mimic circleci + OSTYPE: "darwin" + CI: "true" + run: | + set -e + eval "$(conda shell.bash hook)" + conda activate bioconda + + # Use SDK with arm64 support + export MACOSX_DEPLOYMENT_TARGET=11.0 + + # The SDK isn't actually cached, so reinstall it + run_conda_forge_build_setup + + bioconda-utils handle-merged-pr recipes config.yml \ + --repo bioconda/bioconda-recipes \ + --git-range ${GITHUB_SHA}~1 ${GITHUB_SHA} \ + --fallback build \ + --artifact-source github-actions \ + --dry-run + # TODO: remove dry-run after testing