Simplify and fix bugs of bootstrap json file generating script (#40) #171
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: "Patchelf" | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v0.** | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: patchelf-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
SPACK_COLOR: always | |
SPACK_BACKTRACE: please | |
PYTHONUNBUFFERED: 1 | |
jobs: | |
manylinux2014: | |
runs-on: ubuntu-20.04 | |
outputs: | |
spack_manylinux_tag: ${{ fromJSON(steps.docker_meta.outputs.json).tags[0] }} | |
steps: | |
- uses: actions/checkout@v4 | |
# Setup tags to be used for docker images | |
- uses: docker/metadata-action@v5 | |
id: docker_meta | |
with: | |
images: ghcr.io/${{ github.repository_owner }}/patchelf_manylinux2014 | |
# Login to Github Packages | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/setup-qemu-action@v3 | |
id: qemu | |
with: | |
platforms: linux/ppc64le,linux/arm64,linux/amd64 | |
- uses: docker/setup-buildx-action@v3 | |
# Build and eventually push to registry | |
- uses: docker/build-push-action@v5 | |
with: | |
file: ./patchelf/Dockerfile.manylinux2014 | |
platforms: linux/arm64,linux/ppc64le,linux/amd64 | |
pull: ${{ github.event_name == 'pull_request' }} | |
cache-from: | | |
ghcr.io/${{ github.repository_owner }}/patchelf_manylinux2014:main | |
${{ steps.docker_meta.outputs.tags }} | |
cache-to: type=inline | |
push: true | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
upload-manylinux2014: | |
runs-on: ubuntu-latest | |
needs: [ manylinux2014 ] | |
env: | |
SPACK_MANYLINUX2014_TAG: ${{ needs.manylinux2014.outputs.spack_manylinux_tag }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./copy_mirror_manylinux2014.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: patchelf_binary_mirror | |
path: binary-mirror | |
patchelf_json: | |
runs-on: ubuntu-latest | |
needs: [ upload-manylinux2014 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: spack/spack | |
path: spack | |
ref: d36452cf4e70fa1da8b9db43921850872b82ced9 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: patchelf_binary_mirror | |
- run: ./spack/bin/spack python ./generate_bootstrap_json.py patchelf | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: patchelf_manifest | |
path: patchelf.json |