forked from key4hep/key4hep-spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] add automated check for unchecksummed versions
- Loading branch information
Showing
4 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
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,18 @@ | ||
#!/bin/bash | ||
|
||
package_list=$(spack maintainers --by-user vvolkl mirguest tmadlener) | ||
|
||
# todo: add packages by hep/key4hep label also? | ||
|
||
# prune duplicates (needed if package list is appended to) | ||
#package_list=$(echo ${package_list} | tr ' ' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/[[:space:]]*$//') | ||
|
||
for p in ${package_list}; do | ||
v=$(spack versions --new $p) | ||
# ignore pre and rc versions | ||
v=$(echo $v | sed 's/\S*\(rc\|pre\|alpha\)\S*//g') | ||
if [[ ! -z "$v" ]]; then | ||
echo $p: $v >> gh-new-version.log | ||
fi | ||
done | ||
|
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,14 @@ | ||
generate_new_version_data() | ||
{ | ||
cat <<EOF | ||
{ | ||
"title": "[bot] Found new package versions to checksum", | ||
"body": "$(cat gh-new-version.log | sed -z 's/\n/\\n/g')", | ||
"labels:" "new-version" | ||
} | ||
EOF | ||
} | ||
curl -s -H "Authorization: token ${KEY4HEP_COMMENT_BOT_TOKEN}" \ | ||
-X POST -d "$(generate_post_data)" \ | ||
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/" | ||
|
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,33 @@ | ||
name: concretize-ubuntu | ||
|
||
on: | ||
schedule: | ||
- cron: "0 13 * * 1" # Every Monday at 1PM UTC (9AM EST) | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup spack | ||
run: | | ||
mkdir ${GITHUB_WORKSPACE}/../spack | ||
cd ${GITHUB_WORKSPACE}/../spack | ||
git clone --depth 1 https://github.com/key4hep/spack . | ||
cp -r ${GITHUB_WORKSPACE} var/spack/repos/ | ||
cp var/spack/repos/$(basename ${GITHUB_REPOSITORY})/config/packages.yaml etc/spack | ||
source share/spack/setup-env.sh | ||
spack repo add --scope site ${PWD}/var/spack/repos/$(basename ${GITHUB_REPOSITORY}) | ||
- name: Check for new versions | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/../spack | ||
source share/spack/setup-env.sh | ||
- name: Check for New Versions and Create Issue | ||
env: | ||
KEY4HEP_COMMENT_BOT_TOKEN: ${{ secrets.KEY4HEP_COMMENT_BOT_TOKEN }} | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/../spack | ||
source share/spack/setup-env.sh | ||
${GITHUB_WORKSPACE}/.github/scripts/generate_new_version_issue.sh | ||
${GITHUB_WORKSPACE}/.github/scripts/post__new_version_issue.sh |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
*.pyc | ||
*.log | ||
*.swp | ||
*.lock | ||
.spack-env | ||
|