-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add a new workflow for concretization and delete older concretization workflows #646
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
cb098a1
Remove the old workflows for concretizing
jmcarcell 16d28b9
Add a workflow for concretizing
jmcarcell 08663c4
Fix syntax
jmcarcell 8fe2526
Fix syntax
jmcarcell ee3373b
Fix
jmcarcell ae47085
Get the image
jmcarcell 2b0c6fe
Trigger CI
jmcarcell 0eaff62
Make name available
jmcarcell 4e4f23d
ls /
jmcarcell 6531c23
Add another ls
jmcarcell 5dfdbc8
Add missing checkout
jmcarcell f0abc9f
Use a different command
jmcarcell 127906f
Fix command
jmcarcell c9272ab
Also fetch the nightly versions
jmcarcell 31c2c1d
Fix missing /
jmcarcell 239d030
Install pyyaml
jmcarcell 2912761
Add missing /
jmcarcell 90b6595
Use key4hep-spack instead of ${name}
jmcarcell 189fec9
Move concurrency inside the job
jmcarcell a24198c
Fix indentation
jmcarcell 3c99556
Test failure
jmcarcell b2efd92
Try to fix the cancellations
jmcarcell 3d7f689
Remove inputs
jmcarcell 2347c7a
Trigger CI
jmcarcell 2f48bf2
Remove exit 1
jmcarcell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
concretize: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.image }}-${{ matrix.build_type }} | ||
cancel-in-progress: true | ||
strategy: | ||
matrix: | ||
image: [alma9, ubuntu22] | ||
build_type: [release, nightly] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Start container | ||
run: | | ||
name=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]') | ||
if [ "${{ matrix.image }}" = "alma9" ]; then | ||
docker run --name container --privileged -v ${GITHUB_WORKSPACE}:/key4hep-spack -v ~/.cache/ccache:/root/.cache/ccache -d ghcr.io/key4hep/key4hep-images/alma9-cvmfs tail -f /dev/null | ||
elif [ "${{ matrix.image }}" = "ubuntu22" ]; then | ||
docker run --name container --privileged -v ${GITHUB_WORKSPACE}:/key4hep-spack -v ~/.cache/ccache:/root/.cache/ccache -d ghcr.io/key4hep/key4hep-images/ubuntu22-cvmfs tail -f /dev/null | ||
else | ||
echo "Unknown image" | ||
exit 1 | ||
fi | ||
|
||
- name: Setup environment and concretize | ||
run: | | ||
|
||
cat <<'EOF' > ${GITHUB_WORKSPACE}/script_container.sh | ||
set -e | ||
|
||
cd / | ||
ls -lah / | ||
ls -lah /key4hep-spack | ||
|
||
git clone https://github.com/spack/spack -q | ||
source spack/share/spack/setup-env.sh | ||
|
||
cd /spack | ||
git checkout $(cat /key4hep-spack/.latest-commit) | ||
source /key4hep-spack/.cherry-pick | ||
|
||
if [ "${{ matrix.build_type }}" = "release" ]; then | ||
env=key4hep-release | ||
elif [ "${{ matrix.build_type }}" = "nightly" ]; then | ||
env=key4hep-nightly-opt | ||
pip3 install pyyaml | ||
jmcarcell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
python3 /key4hep-spack/scripts/fetch_nightly_versions.py --path /key4hep-spack/environments/key4hep-common/packages.yaml --extra-path /key4hep-spack/environments/key4hep-nightly-opt/packages.yaml "" | ||
else | ||
echo "Unknown build type" | ||
exit 1 | ||
fi | ||
cd /key4hep-spack/environments/${env} | ||
spack env activate . | ||
spack concretize | ||
|
||
EOF | ||
|
||
chmod +x ${GITHUB_WORKSPACE}/script_container.sh | ||
|
||
# cat ${GITHUB_WORKSPACE}/script_container.sh | ||
|
||
docker exec container /bin/bash -c "/mount.sh && /key4hep-spack/script_container.sh" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a
at the top. Potentially, even
ref: $(cat ${GITHUB_WORKSPACE}/.latest-commit)
works, but since we need the history ofdevelop
as well, we would then also have to tweak thefetch-depth
, so I am not sure whether it's worth it to specify that here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not sure. The checkout action seems to do more things and sometimes it takes more than a simple clone.