Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix spack ubuntu CPU build #144

Merged
merged 6 commits into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 29 additions & 18 deletions .github/workflows/spack_cpu_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ env:
# Our repo name contains upper case characters, so we can't use ${{ github.repository }}
IMAGE_NAME: exago
USERNAME: exago-bot
BASE_VERSION: ubuntu-22.04-fortran
BASE_VERSION: ubuntu-24.04-fortran
SPACK_CACHE: /opt/spack-cache
tempdir: /opt/spack-cache
TMP: /opt/spack-cache
TMPDIR: /opt/spack-cache

# Until we remove the need to clone submodules to build, this should on be in PRs
on: [pull_request]

jobs:
base_image_build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
packages: write
contents: read
Expand All @@ -32,7 +36,7 @@ jobs:
- name: Create Dockerfile heredoc
run: |
cat << EOF > Dockerfile
FROM ubuntu:22.04
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common \
Expand All @@ -55,7 +59,7 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
Expand All @@ -73,27 +77,27 @@ jobs:

exago_spack_builds:
needs: base_image_build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
packages: write
contents: read

strategy:
matrix:
# Minimal Build(s) - GHCR mirror speeds these up a lot!
spack_spec:
# See #39 - ~python~mpi causes issues
# - exago@develop~mpi~ipopt~hiop~python~raja
# - exago@develop~mpi~ipopt~hiop~python~raja
# See #44 - +mpi~python should fail if no python in system,
# but the runner happens to have one...
- exago@develop+mpi~ipopt+hiop~python~raja ^openmpi
# See #18 - +hiop~mpi causes issues
# - exago@develop~mpi~ipopt+hiop~python+raja
# - exago@develop~mpi~ipopt+hiop~python+raja
# See #16 - +python~mpi causes issues
# - exago@develop~mpi~ipopt+hiop+python~raja
# - exago@develop~mpi~ipopt+hiop+python~raja
- exago@develop+mpi~ipopt+hiop+python~raja ^openmpi
# See #40 - +hiop+raja~ipopt ^hiop~sparse is useful for edge cases
- exago@develop+mpi~ipopt+hiop~python+raja ^openmpi ^hiop+raja~sparse
- exago@develop+mpi~ipopt+hiop~python+raja ^openmpi ^hiop+raja~sparse

name: Build ExaGO with Spack
steps:
Expand All @@ -103,10 +107,10 @@ jobs:
# Once we move submodule deps into spack, we can do some more builds
# Also need to change build script to use spack from base image
submodules: true

- name: Setup Spack
run: echo "$PWD/tpl/spack/bin" >> "$GITHUB_PATH"

- name: Create heredoc spack.yaml
run: |
cat << EOF > spack.yaml
Expand All @@ -116,31 +120,38 @@ jobs:
concretizer:
reuse: dependencies
config:
concretizer: clingo
source_cache: $SPACK_CACHE/source_cache
misc_cache: $SPACK_CACHE/misc_cache
build_stage: $SPACK_CACHE/build_stage
install_tree:
root: /opt/spack
padded_length: False
mirrors:
local-buildcache: oci://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
spack: https://binaries.spack.io/develop
packages:
all:
require: "%gcc"
jaelynlitz marked this conversation as resolved.
Show resolved Hide resolved

- name: Configure GHCR mirror
run: spack -e . mirror set --oci-username ${{ env.USERNAME }} --oci-password "${{ secrets.GITHUB_TOKEN }}" local-buildcache

- name: Trust keys
run: spack -e . buildcache keys --install --trust

- name: Find external packages
run: spack -e . external find --all --exclude python

- name: Spack develop exago
run: spack -e . develop --path=$(pwd) exago@develop

- name: Concretize
run: spack -e . concretize

- name: Install
run: spack -e . install --no-check-signature
run: spack -e . install --no-check-signature --fail-fast

# Push with force to override existing binaries...
- name: Push to binaries to buildcache
run: |
Expand Down
Loading