Skip to content

Commit

Permalink
Revert "troubleshoot again"
Browse files Browse the repository at this point in the history
This reverts commit c241e1a.
  • Loading branch information
haampie committed Oct 17, 2024
1 parent c241e1a commit b8135d2
Show file tree
Hide file tree
Showing 3 changed files with 319 additions and 5 deletions.
84 changes: 79 additions & 5 deletions .github/workflows/clingo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
runs-on: ${{ matrix.runner[0] }}
strategy:
matrix:
python-version: ["3.6", "3.7"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
# runner + macOS deployment target
runner: [["macos-13", "10.13"]]
runner: [["macos-13", "10.13"], ["macos-14", "11"]]
exclude:
- python-version: "3.6"
runner: ["macos-14", "11"]
Expand Down Expand Up @@ -56,10 +56,84 @@ jobs:
spack python clingo/scripts/install_clingo.py
spack buildcache push --unsigned ./binary-mirror clingo-bootstrap
- name: Setup tmate
if: failure()
uses: mxschmitt/action-tmate@v3
- uses: actions/upload-artifact@v3
with:
name: clingo_binary_mirror
path: binary-mirror


manylinux2014:
runs-on: ["self-hosted", "Linux"]
outputs:
spack_manylinux_tag: ${{ fromJSON(steps.docker_meta.outputs.json).tags[0] }}
permissions:
packages: write

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 }}/clingo_manylinux2014

# Login to Github Packages
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/setup-qemu-action@v3
id: qemu
with:
platforms: linux/ppc64le,linux/arm64

- uses: docker/setup-buildx-action@v3

# Build and eventually push to registry
- uses: docker/build-push-action@v5
with:
file: ./clingo/Dockerfile.manylinux2014
platforms: linux/arm64,linux/ppc64le,linux/amd64
cache-from: |
ghcr.io/${{ github.repository_owner }}/clingo_manylinux2014:main
${{ steps.docker_meta.outputs.tags }}
cache-to: type=inline
pull: ${{ github.event_name == 'pull_request' }}
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: clingo_binary_mirror
path: binary-mirror

clingo_json:
runs-on: ubuntu-latest
needs: [ upload-manylinux2014, macos_clingo ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: actions/download-artifact@v3
with:
name: clingo_binary_mirror
- run: |
pip install ruamel.yaml
python3 clingo/scripts/clingo_json.py
- uses: actions/upload-artifact@v3
with:
name: clingo_manifest
path: clingo.json
142 changes: 142 additions & 0 deletions .github/workflows/gnupg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: "GnuPG"

on:
push:
branches:
- main
tags:
- v0.**
pull_request:
branches:
- main
workflow_dispatch:

concurrency:
group: gnupg-${{ github.ref }}
cancel-in-progress: true

env:
SPACK_COLOR: always
SPACK_BACKTRACE: please
PYTHONUNBUFFERED: 1

jobs:
macos_gnupg:
runs-on: ${{ matrix.runner[0] }}
strategy:
# List of:
# 1. Runners
# 2. Target architectures
# 3. macOS deployment target
matrix:
runner: [
["macos-13", "x86_64", "10.13"], # highsierra
["macos-14", "aarch64", "11"] # bigsur
]
env:
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.runner[2] }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: spack/spack
path: spack
ref: c710a1597f3566ab850d0ee8c82e71af04a08f9e
- name: Install gnupg
run: |
brew install gawk perl
# Disables internationalization to avoid linking to
# libintl on MacOS, since that will make the binary
# non portable
git -C spack apply "$PWD/gnupg/patches/gnupg_macos.patch"
. spack/share/spack/setup-env.sh
spack external find --not-buildable gawk perl
spack config add "config:install_tree:padded_length:256"
spack install gnupg target=${{ matrix.runner[1] }}
spack buildcache push --unsigned ./binary-mirror gnupg
- uses: actions/upload-artifact@v3
with:
name: gnupg_binary_mirror
path: binary-mirror

manylinux2014:
runs-on: ["self-hosted", "Linux"]
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 }}/gnupg_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: ./gnupg/Dockerfile.manylinux2014
platforms: linux/arm64,linux/ppc64le,linux/amd64
pull: ${{ github.event_name == 'pull_request' }}
cache-from: |
ghcr.io/${{ github.repository_owner }}/gnupg_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: gnupg_binary_mirror
path: binary-mirror

gnupg_json:
runs-on: ubuntu-latest
needs: [ upload-manylinux2014, macos_gnupg ]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: spack/spack
path: spack
- uses: actions/setup-python@v4
with:
python-version: 3.11
- uses: actions/download-artifact@v3
with:
name: gnupg_binary_mirror
- run: |
. spack/share/spack/setup-env.sh
spack python gnupg/scripts/gnupg_json.py
- uses: actions/upload-artifact@v3
with:
name: gnupg_manifest
path: gnupg.json
98 changes: 98 additions & 0 deletions .github/workflows/patchelf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
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/setup-python@v4
with:
python-version: 3.9
- uses: actions/download-artifact@v3
with:
name: patchelf_binary_mirror
- run: |
pip install ruamel.yaml
python3 patchelf/scripts/patchelf_json.py
- uses: actions/upload-artifact@v3
with:
name: patchelf_manifest
path: patchelf.json

0 comments on commit b8135d2

Please sign in to comment.