Skip to content
Merged
Show file tree
Hide file tree
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
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
32 changes: 11 additions & 21 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,32 +28,34 @@ 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

- name: Re-generate outputs from tutorial scripts
run: |
chmod -R a+w outputs
make -C outputs -j $(nproc) DOCKER_RUN_OPTS="-e COLUMNS=94 -e COLIFY_SIZE=24x94" container=ghcr.io/spack/tutorial
mkdir spack-home && sudo chown -R 1000:1000 spack-home
DOCKER_RUN_OPTS="-e COLUMNS=94 -e COLIFY_SIZE=24x94 -v $(pwd)/spack-home:/home/spack"
make -C outputs -j $(nproc) DOCKER_RUN_OPTS="$DOCKER_RUN_OPTS" container=ghcr.io/spack/tutorial

- name: Show diff of modified files
run: |
git diff HEAD .
git diff HEAD outputs/

- name: Push modified files to branch
if: ( github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork )
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git add outputs/
git commit -m "Update generated outputs on behalf of [@${{ github.actor }}]"
git push
7 changes: 4 additions & 3 deletions container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ 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
vim \
rclone

# 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
10 changes: 5 additions & 5 deletions 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 All @@ -34,17 +34,17 @@ update-outputs: #run

run: run-scripting

run-scripting: run-cache scripting.sh
run-cache: run-dev cache.sh
run-scripting: run-dev scripting.sh
# run-cache: run-dev cache.sh
run-dev: run-packaging dev.sh
run-packaging: run-stacks packaging.sh
run-stacks: run-environments stacks.sh
run-environments: run-basics environments.sh
run-basics: basics.sh init_spack.sh defs.sh

local: local-scripting
local-scripting: local-cache scripting.sh
local-cache: local-dev cache.sh
local-scripting: local-dev scripting.sh
# local-cache: local-dev cache.sh
local-dev: local-packaging dev.sh
local-packaging: local-stacks packaging.sh
local-stacks: local-environments stacks.sh
Expand Down
14 changes: 7 additions & 7 deletions outputs/basics/clone.out
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$ git clone --depth=2 --branch=releases/v0.23 https://github.com/spack/spack.git ~/spack
Cloning into '/home/spack5/spack'...
remote: Enumerating objects: 20970, done.K
remote: Counting objects: 100% (20970/20970), done.K
remote: Compressing objects: 100% (11467/11467), done.K
Receiving objects: 100% (20970/20970), 14.78 MiB | 23.43 MiB/s, done.
remote: Total 20970 (delta 1785), reused 14006 (delta 1489), pack-reused 0 (from 0)K
Resolving deltas: 100% (1785/1785), done.
Cloning into '/home/spack/spack'...
remote: Enumerating objects: 20971, done.K
remote: Counting objects: 100% (20971/20971), done.K
remote: Compressing objects: 100% (11448/11448), done.K
remote:nTotale20971 (delta01801),9reused014170i(delta.1509),/pack-reused 0 (from 0)K
Receiving objects: 100% (20971/20971), 14.78 MiB | 20.70 MiB/s, done.
Resolving deltas: 100% (1801/1801), done.
$ cd ~/spack
4 changes: 2 additions & 2 deletions outputs/basics/compiler-add-location.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ spack compiler add "$(spack location -i gcc@12)"
==> Added 1 new compiler to /home/spack5/.spack/linux/compilers.yaml
==> Added 1 new compiler to /home/spack/.spack/linux/compilers.yaml
gcc@12.3.0
==> Compilers are defined in the following files:
/home/spack5/.spack/linux/compilers.yaml
/home/spack/.spack/linux/compilers.yaml
7 changes: 5 additions & 2 deletions outputs/basics/find-lf.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ $ spack find -lf
xvsfmyv glibc@2.35%clang gcbcod5 gmake@4.4.1%clang jjykcjt zlib-ng@2.2.1%clang

-- linux-ubuntu22.04-x86_64_v3 / gcc@10.5.0 ---------------------
g7dc4ou gcc-runtime@10.5.0%gcc tcngwuv glibc@2.35%gcc he2qdcb gmake@4.4.1%gcc aiapvpp zlib-ng@2.2.1%gcc
g7dc4ou gcc-runtime@10.5.0%gcc he2qdcb gmake@4.4.1%gcc
tcngwuv glibc@2.35%gcc aiapvpp zlib-ng@2.2.1%gcc

-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
hshzy76 gcc-runtime@11.4.0%gcc a7drdl4 glibc@2.35%gcc srkzfjr gmake@4.4.1%gcc ocxrmff zlib-ng@2.0.7%gcc umrbkwv zlib-ng@2.0.7%gcc cflags=-O3
hshzy76 gcc-runtime@11.4.0%gcc ocxrmff zlib-ng@2.0.7%gcc
a7drdl4 glibc@2.35%gcc umrbkwv zlib-ng@2.0.7%gcc cflags=-O3
srkzfjr gmake@4.4.1%gcc
==> 12 installed packages
2 changes: 1 addition & 1 deletion outputs/basics/find-p-gcc.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ spack find -p gcc
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
gcc@12.3.0 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-12.3.0-jjgfqpdmihb2cq5ca7txia5oshruq56q
gcc@12.3.0 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-12.3.0-jjgfqpdmihb2cq5ca7txia5oshruq56q
==> 1 installed package
20 changes: 10 additions & 10 deletions outputs/basics/find-px.out
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
$ spack find -px
-- linux-ubuntu22.04-x86_64_v3 / clang@14.0.0 -------------------
zlib-ng@2.2.1 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/clang-14.0.0/zlib-ng-2.2.1-jjykcjtfyoezsckykaklun6a75bzd24o
zlib-ng@2.2.1 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/clang-14.0.0/zlib-ng-2.2.1-jjykcjtfyoezsckykaklun6a75bzd24o

-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
gmake@4.4.1 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
hdf5@1.14.5 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hdf5-1.14.5-ckoh67fpzb5gn7mti2xzruvlxd424par
hdf5@1.14.5 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hdf5-1.14.5-6ddnwvambfcyhhhs7ehog6gkftrkljnt
hdf5@1.14.5 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hdf5-1.14.5-tgtmflo4s6hqenvkle7urqiz2w6rumph
tcl@8.6.12 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tcl-8.6.12-imrm45j44xmboxdqpj7akq2lwkwza4vo
tcl@8.6.12 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tcl-8.6.12-w4gwr4ezmenbvt7u5zdyjdkfzapsz5lt
trilinos@16.0.0 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/trilinos-16.0.0-63sfm7p6vebucsnbmwfnx36hiyal7e3e
zlib-ng@2.0.7 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.0.7-ocxrmffc7qnibijshhygluei5qiycvja
zlib-ng@2.0.7 /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.0.7-umrbkwvnydtpljzy4isoednibe4mwcvz
gmake@4.4.1 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
hdf5@1.14.5 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hdf5-1.14.5-ckoh67fpzb5gn7mti2xzruvlxd424par
hdf5@1.14.5 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hdf5-1.14.5-6ddnwvambfcyhhhs7ehog6gkftrkljnt
hdf5@1.14.5 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/hdf5-1.14.5-tgtmflo4s6hqenvkle7urqiz2w6rumph
tcl@8.6.12 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tcl-8.6.12-imrm45j44xmboxdqpj7akq2lwkwza4vo
tcl@8.6.12 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/tcl-8.6.12-w4gwr4ezmenbvt7u5zdyjdkfzapsz5lt
trilinos@16.0.0 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/trilinos-16.0.0-63sfm7p6vebucsnbmwfnx36hiyal7e3e
zlib-ng@2.0.7 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.0.7-ocxrmffc7qnibijshhygluei5qiycvja
zlib-ng@2.0.7 /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/zlib-ng-2.0.7-umrbkwvnydtpljzy4isoednibe4mwcvz
==> 10 installed packages
11 changes: 4 additions & 7 deletions outputs/basics/gmake.out
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
$ spack install gmake
==> Fetching https://ghcr.io/v2/spack/bootstrap-buildcache-v1/blobs/sha256:8d2764eefa443c29c7c9120079e3bbe7576bbc496b15843ad18d18892338a5ba
==> Fetching https://ghcr.io/v2/spack/bootstrap-buildcache-v1/blobs/sha256:a4abec667660307ad5cff0a616d6651e187cc7b1386fd8cd4b6b288a01614076
==> Installing "clingo-bootstrap@=spack%gcc@=10.2.1~docs+ipo+optimized+python+static_libstdcpp build_system=cmake build_type=Release generator=make patches=bebb819,ec99431 arch=linux-centos7-x86_64" from a buildcache
[+] /usr (external glibc-2.35-a7drdl4tlx4bu3mzhor75pskvd3pdot6)
==> Installing gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2 [2/3]
==> No binary for gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2 found: installing from source
==> No patches needed for gcc-runtime
==> gcc-runtime: Executing phase: 'install'
==> gcc-runtime: Successfully installed gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
Stage: 0.00s. Install: 0.05s. Post-install: 0.04s. Total: 0.12s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
Stage: 0.00s. Install: 0.05s. Post-install: 0.03s. Total: 0.09s
[+] /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gcc-runtime-11.4.0-hshzy762rns57ibvxiyi3qqvc4nehse2
==> Installing gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom [3/3]
==> No binary for gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom found: installing from source
==> Fetching https://mirror.spack.io/_source-cache/archive/dd/dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3.tar.gz
==> No patches needed for gmake
==> gmake: Executing phase: 'install'
==> gmake: Successfully installed gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
Stage: 0.10s. Install: 11.58s. Post-install: 0.01s. Total: 11.72s
[+] /home/spack5/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
Stage: 0.16s. Install: 10.60s. Post-install: 0.01s. Total: 10.78s
[+] /home/spack/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/gmake-4.4.1-srkzfjru5z55bl5gy24dbjsrvqwg5fom
17 changes: 17 additions & 0 deletions outputs/basics/graph-tcl.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
$ spack graph tcl
o tcl@8.6.12/w4gwr4e
|\
| |\
| | |\
o | | | zlib-ng@2.2.1/fhud6vq
|\| | |
|\ \ \ \
| |_|/ /
|/| | |
| |/ /
| | o gmake@4.4.1/srkzfjr
| |/|
|/|/
| o gcc-runtime@11.4.0/hshzy76
|/
o glibc@2.35/a7drdl4
Loading