Skip to content

Commit

Permalink
test arm builds for current builds (#7)
Browse files Browse the repository at this point in the history
* test arm builds for current builds (will need to do on aws instance)

Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch authored Dec 16, 2023
1 parent ed303a0 commit 722fafc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-matrices.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Flux View Build Matrices

on:
# Enable for testing builds for a PR
workflow_dispatch:
pull_request: []
push:
Expand Down Expand Up @@ -51,7 +50,7 @@ jobs:

if: ${{ needs.generate.outputs.empty_matrix == 'false' }}

name: Build ${{ matrix.result.container_name }} ${{ matrix.arch[0] }}
name: Build ${{ matrix.result.container_name }} ${{ matrix.arch }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -79,6 +78,7 @@ jobs:
container_name=$(python .github/container_name.py "${container}" flux-view)
echo "Container name is ${container_name}"
echo "container_name=${container_name}" >> $GITHUB_ENV
echo "container_arch=x86_64" >> $GITHUB_ENV
- name: Pull Docker Layers
run: docker pull ghcr.io/converged-computing/${container_name} || exit 0
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
with:
context: ${{ env.dockerfile_dir }}
file: ${{ env.filename }}
platforms: ${{ matrix.arch[0] }}
platforms: ${{ matrix.arch }}
push: ${{ github.event_name != 'pull_request' }}
build-args: |
${{ env.build_args }}
Expand Down
16 changes: 13 additions & 3 deletions rocky/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
ARG tag=8
FROM spack/rockylinux${tag}:latest as builder
ARG ARCH=x86_64
ENV ARCH=${ARCH}

RUN dnf update -y && dnf install -y gettext

# Specify flux deps in the spack manifest file (spack.yaml)
RUN mkdir /opt/spack-environment \
Expand All @@ -10,12 +14,18 @@ RUN mkdir /opt/spack-environment \
&& echo ' unify: true' \
&& echo ' packages:' \
&& echo ' all:' \
&& echo ' require: ["target=:x86_64"]' \
&& echo ' require: ["target=:${ARCH}"]' \
&& echo ' config:' \
&& echo ' install_tree: /opt/software') > /opt/spack-environment/spack.yaml
&& echo ' install_tree: /opt/software') > /opt/spack-environment/spack-template.yaml

RUN envsubst < /opt/spack-environment/spack-template.yaml > /opt/spack-environment/spack.yaml && \
cat /opt/spack-environment/spack.yaml

# Install the software, remove unnecessary deps
RUN cd /opt/spack-environment && spack env activate . && spack install --fail-fast && spack gc -y
RUN cd /opt/spack-environment && \
. /opt/spack/share/spack/setup-env.sh && \
spack env activate . && \
spack install --fail-fast && spack gc -y

# Strip all the binaries
RUN find -L /opt/views/view/* -type f -exec readlink -f '{}' \; | \
Expand Down
16 changes: 13 additions & 3 deletions ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
ARG tag=jammy
FROM spack/ubuntu-${tag}:latest as builder
ARG ARCH=x86_64
ENV ARCH=${ARCH}

RUN apt-get update && apt-get install -y gettext-base

# What we want to install and how we want to install it
# is specified in a manifest file (spack.yaml)
Expand All @@ -11,12 +15,18 @@ RUN mkdir /opt/spack-environment \
&& echo ' unify: true' \
&& echo ' packages:' \
&& echo ' all:' \
&& echo ' require: ["target=:x86_64"]' \
&& echo ' require: ["target=:${ARCH}"]' \
&& echo ' config:' \
&& echo ' install_tree: /opt/software') > /opt/spack-environment/spack.yaml
&& echo ' install_tree: /opt/software') > /opt/spack-environment/spack-template.yaml

RUN envsubst < /opt/spack-environment/spack-template.yaml > /opt/spack-environment/spack.yaml && \
cat /opt/spack-environment/spack.yaml

# Install the software, remove unnecessary deps
RUN cd /opt/spack-environment && spack env activate . && spack install --fail-fast && spack gc -y
RUN cd /opt/spack-environment && \
. /opt/spack/share/spack/setup-env.sh && \
spack env activate . && \
spack install --fail-fast && spack gc -y

# Strip all the binaries
RUN find -L /opt/views/view/* -type f -exec readlink -f '{}' \; | \
Expand Down

0 comments on commit 722fafc

Please sign in to comment.