Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e9d1ba5
ci: fix outputs generation for pre v1.0
alecbcs Jul 17, 2025
f6f7fea
Swap container check to use inputs
alecbcs Jul 18, 2025
8c9a383
Fix expected input
alecbcs Jul 18, 2025
31bd770
Fix typo in the calling parameter generation
alecbcs Jul 18, 2025
a43ea95
Attempt to use boolean inputs
alecbcs Jul 18, 2025
4ccd048
Revert back to v0.23.1 for PEARC25
alecbcs Jul 20, 2025
98b0a1d
Update container base to Ubuntu 24.04
alecbcs Jul 20, 2025
bdfc51a
PIP install the awscli client via pip
alecbcs Jul 20, 2025
bd3d239
Add setuptools to container, drop mass delete task
alecbcs Jul 20, 2025
584b27b
Drop awscli in favor of rclone
alecbcs Jul 20, 2025
863b762
Add ca-certificates to the container
alecbcs Jul 20, 2025
039fb0d
Add git to container
alecbcs Jul 20, 2025
8fa0206
Drop mass removal from outputs generation
alecbcs Jul 20, 2025
4237159
Skip stacks for now
alecbcs Jul 20, 2025
e11364b
Hardcode set the MODULEPATH
alecbcs Jul 20, 2025
b3b5af9
Modify tutorial to be more generic in machine type / distribution name
alecbcs Jul 20, 2025
404e8c0
Try using shorthand instead of $HOME variable
alecbcs Jul 20, 2025
958c8fb
Don't run everything to debug
alecbcs Jul 20, 2025
1f56212
Add debug statements
alecbcs Jul 20, 2025
eb02731
Attempt without quotes
alecbcs Jul 21, 2025
26a9573
Debug with a hardcoded path
alecbcs Jul 21, 2025
d366050
Check paths
alecbcs Jul 21, 2025
3e15fb1
Try simple path
alecbcs Jul 21, 2025
a411dca
Add platform into path
alecbcs Jul 21, 2025
a8ba6b1
Add core_compilers section
alecbcs Jul 21, 2025
fc245a9
Seemed to be better let's generalize
alecbcs Jul 21, 2025
4b02539
Add gcc as core_spec
alecbcs Jul 21, 2025
bc9fa75
Try something else
alecbcs Jul 21, 2025
a5332d2
Getting further!
alecbcs Jul 21, 2025
68202b5
Update generated outputs on behalf of [@alecbcs]
github-actions[bot] Jul 21, 2025
bef7ce6
Run all
alecbcs Jul 21, 2025
331a12e
Revert changed container, skip failing spack info
alecbcs Jul 21, 2025
49752b8
Add back ca-certificates
alecbcs Jul 21, 2025
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
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ jobs:
needs: changes
uses: ./.github/workflows/container.yml

# outputs:
# if: |
# !cancelled()
# && contains(needs.*.result, 'success')
# && !contains(needs.*.result, 'failure')
# && (needs.changes.outputs.outputs == 'true'
# || startsWith(github.ref, 'refs/tags/'))
# needs: [ changes, container ]
# uses: ./.github/workflows/outputs.yml
outputs:
if: |
!cancelled()
&& contains(needs.*.result, 'success')
&& !contains(needs.*.result, 'failure')
&& (needs.changes.outputs.outputs == 'true'
|| startsWith(github.ref, 'refs/tags/'))
needs: [ changes, container ]
uses: ./.github/workflows/outputs.yml
with:
with_pr_container: ${{ needs.container.result == 'success' }}

style:
if: ${{ needs.changes.outputs.style == 'true' }}
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,6 @@ jobs:
packages: write

steps:
- name: Remove pre-installed apps to make space for build
run: |
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^mongodb-.*'
sudo apt-get remove -y '^mysql-.*'
sudo apt-get autoremove -y
sudo apt-get clean
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/lib/node_modules

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf

Expand Down
24 changes: 6 additions & 18 deletions .github/workflows/outputs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Generate outputs
on:
workflow_call:
inputs:
with_pr_container:
required: true
type: boolean

jobs:
re-generate:
Expand All @@ -10,22 +14,6 @@ jobs:
contents: write

steps:
- name: Remove pre-installed apps to make space for build
run: |
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^mongodb-.*'
sudo apt-get remove -y '^mysql-.*'
sudo apt-get autoremove -y
sudo apt-get clean
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/lib/node_modules
sudo docker system prune -af

- name: Checkout (Push)
if: github.event_name != 'pull_request'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
Expand All @@ -40,14 +28,14 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Download container from artifact if PR
if: github.event_name == 'pull_request' && needs.container.result == 'success'
if: github.event_name == 'pull_request' && inputs.with_pr_container
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: tutorial-container
path: /tmp

- name: Import container from PR artifact
if: github.event_name == 'pull_request' && needs.container.result == 'success'
if: github.event_name == 'pull_request' && inputs.with_pr_container
run: |
docker load --input /tmp/tutorial-container.tar
docker image ls -a
Expand Down
13 changes: 6 additions & 7 deletions container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
FROM ghcr.io/spack/tutorial-ubuntu-22.04:v2024-05-07
FROM ghcr.io/spack/tutorial-ubuntu-22.04

ENV DEBIAN_FRONTEND=noninteractive

# Install AWS cli
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
awscli \
bash-completion \
ca-certificates \
emacs \
jq \
less \
vim
rclone \
vim \
&& rm -rf /var/lib/apt/lists/*

# Remove GCC 12 from container
RUN apt-get remove -y gcc-12

# Download the buildcache
RUN mkdir /mirror
RUN aws --region us-east-1 --no-sign-request s3 sync --only-show-errors s3://spack-binaries/releases/v0.23/tutorial /mirror
RUN rclone copy :s3:spack-binaries/v0.23.1/tutorial /mirror

RUN chmod -R go+r /mirror

Expand Down
2 changes: 1 addition & 1 deletion outputs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sections := environments
run_targets := $(addprefix run-,$(sections))

# Entrypoint
update-outputs: #run
update-outputs: run
echo "Filtering raw outputs though col"
for raw in raw/*/*.out; do \
out=$$(echo $$raw | sed 's.raw/..'); \
Expand Down
4 changes: 2 additions & 2 deletions outputs/modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ example --tee modules/lmod-intro-conflict "module list"
cp "$PROJECT/module-configs/lmod.1.yaml" ~/.spack/modules.yaml
example modules/lmod-refresh-1 "spack module lmod refresh --delete-tree -y"
module purge
module unuse "$HOME/spack/share/spack/modules/linux-ubuntu22.04-x86_64_v3"
module use "$HOME/spack/share/spack/lmod/linux-ubuntu22.04-x86_64/Core"
module unuse "$HOME/spack/share/spack/modules/*"
module use "$HOME/spack/share/spack/lmod/*/Core"
example --tee modules/module-avail-6 "module avail"


Expand Down
2 changes: 1 addition & 1 deletion outputs/packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ example packaging/checksum-mpileaks-1 "spack checksum tutorial-mpileaks 1.0"
example --expect-error packaging/install-mpileaks-1 "spack install tutorial-mpileaks"

cp "$PROJECT/package-py-files/1.package.py" "$mpileaks_package_py"
example packaging/info-mpileaks "spack info tutorial-mpileaks"
#example packaging/info-mpileaks "spack info tutorial-mpileaks"

cp "$PROJECT/package-py-files/2.package.py" "$mpileaks_package_py"
example --expect-error packaging/install-mpileaks-2 "spack install tutorial-mpileaks"
Expand Down
2 changes: 1 addition & 1 deletion outputs/stacks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ example --tee stacks/modules-1 "module --version"

cat "$project/stacks/examples/8.spack.stack.yaml" > ~/stacks/spack.yaml
spack module lmod refresh -y
Copy link
Copy Markdown
Member

@haampie haampie Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gcc@12 was a system compiler in the previous image, but that's no longer the case in your updated image.

https://github.com/spack/spack/blob/2bfcc69fa870d3c6919be87593f22647981b648a/lib/spack/spack/modules/lmod.py#L77-L82

module use "$HOME/stacks/modules/linux-ubuntu22.04-x86_64/Core"
module use ~/stacks/modules/*/Core

example --tee stacks/modules-2 "module av"

Expand Down
4 changes: 2 additions & 2 deletions outputs/stacks/compiler-find-0.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ spack compiler find "$(spack location -i gcc)"
==> Added 1 new compiler to /home/spack5/stacks/spack.yaml
==> Added 1 new compiler to /home/spack/stacks/spack.yaml
gcc@12.3.0
==> Compilers are defined in the following files:
/home/spack5/.spack/linux/compilers.yaml /home/spack5/stacks/spack.yaml
/home/spack/.spack/linux/compilers.yaml /home/spack/stacks/spack.yaml
2 changes: 1 addition & 1 deletion outputs/stacks/compiler-find-1.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$ spack location -i gcc
/home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-12.3.0-jjgfqpdmihb2cq5ca7txia5oshruq56q
/home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-12.3.0-jjgfqpdmihb2cq5ca7txia5oshruq56q
8 changes: 4 additions & 4 deletions outputs/stacks/compiler-list-0.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ spack compiler list
==> Available compilers
-- clang ubuntu22.04-x86_64 -------------------------------------
clang@14.0.0
-- clang ubuntu24.04-x86_64 -------------------------------------
clang@18.1.3

-- gcc ubuntu22.04-x86_64 ---------------------------------------
gcc@12.3.0 gcc@11.4.0 gcc@10.5.0
-- gcc ubuntu24.04-x86_64 ---------------------------------------
gcc@13.3.0 gcc@12.3.0 gcc@10.5.0
Loading
Loading