Skip to content

Commit 7774f95

Browse files
authored
Merge pull request #7 from trz42/minimal_changes_license_check
Minimal changes to get licensing PR working
2 parents 1d52888 + 6e9c9f0 commit 7774f95

2 files changed

Lines changed: 26 additions & 10 deletions

File tree

.github/workflows/check_licenses.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ name: Check and update licenses
22

33
on:
44
push:
5-
branches: [ "main", "licenses" ] # this should be kept like this for now because we will continue to do testing in this branches
5+
branches: [ "main" ]
66
pull_request:
7-
branches: [ "main", "licenses" ]
8-
# types: [opened, synchronized]
7+
branches: [ "main" ]
98
permissions:
109
contents: read # we dont need to write
1110

@@ -18,30 +17,39 @@ jobs:
1817
# we just do these two architectures for now as they are ones causing more discrepancies
1918
include:
2019
- runs_on: ubuntu-24.04-arm
20+
EESSI_VERSION: 2023.06
2121
EESSI_SOFTWARE_SUBDIR_OVERRIDE: aarch64/generic
2222
NO_SLASH_NAME: aarch64-generic
2323
- runs_on: ubuntu-24.04
24+
EESSI_VERSION: 2023.06
2425
EESSI_SOFTWARE_SUBDIR_OVERRIDE: x86_64/generic
2526
NO_SLASH_NAME: x86_64-generic
2627

2728
runs-on: ${{ matrix.runs_on }}
2829

2930
steps:
30-
- uses: actions/checkout@v4
31-
- uses: eessi/github-action-eessi@v3
31+
- name: Check out software-layer repository
32+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
33+
34+
- name: Mount EESSI CernVM-FS repository
35+
uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0
36+
with:
37+
cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
38+
cvmfs_http_proxy: DIRECT
39+
cvmfs_repositories: software.eessi.io
3240

3341
- name: Check for missing installations
3442
env:
3543
PR_NUMBER: ${{ github.event.number }}
3644

3745
run: |
3846
export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${{matrix.EESSI_SOFTWARE_SUBDIR_OVERRIDE}}
39-
source /cvmfs/software.eessi.io/versions/${EESSI_VERSION}/init/bash
47+
source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash
4048
4149
# set $EESSI_CPU_FAMILY to the CPU architecture that corresponds to $EESSI_SOFTWARE_SUBDIR_OVERRIDE (part before the first slash),
4250
# to prevent issues with checks in the Easybuild configuration that use this variable
4351
export EESSI_CPU_FAMILY=${EESSI_SOFTWARE_SUBDIR_OVERRIDE%%/*}
44-
export EESSI_PREFIX=/cvmfs/software.eessi.io/versions/${EESSI_VERSION}
52+
export EESSI_PREFIX=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}
4553
export EESSI_OS_TYPE=linux
4654
env | grep ^EESSI | sort
4755
module load EasyBuild
@@ -69,7 +77,7 @@ jobs:
6977
echo "check missing installations for ${easystack_file} with EasyBuild ${eb_version}..."
7078
module purge
7179
module load EasyBuild/${eb_version}
72-
module load EESSI-extend/${EESSI_VERSION}-easybuild
80+
module load EESSI-extend/${{matrix.EESSI_VERSION}}-easybuild
7381
which eb
7482
${EB:-eb} --version
7583
${EB:-eb} --missing --easystack ${easystack_file} 2>&1 | tee ${eb_missing_out}
@@ -111,7 +119,7 @@ jobs:
111119
version="${rest%%-*}" # 0.9.2
112120
113121
# Check if licenses.yml has: NAME -> VERSION
114-
if ! yq -e ".\"$name\".\"$version\"" "$LICENSES_YAML" >/dev/null 2>&1; then
122+
if ! yq -e ".\"$name\".\"$version\"" licenses/licenses.yml >/dev/null 2>&1; then
115123
echo "$module" >> missing_modules.txt
116124
fi
117125
done < missing.txt
@@ -128,6 +136,9 @@ jobs:
128136
if: env.PROCESS_LICENSES == 'true'
129137
run: |
130138
if [ -s missing_modules.txt ]; then
139+
export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${{matrix.EESSI_SOFTWARE_SUBDIR_OVERRIDE}}
140+
source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash
141+
131142
echo "Searching sources for missing modules..."
132143
# Generates a "modules_results.json" file
133144
module load Python-bundle-PyPI/2023.06-GCCcore-12.3.0
@@ -139,6 +150,9 @@ jobs:
139150
if: env.PROCESS_LICENSES == 'true'
140151
run: |
141152
if [ -s modules_results.json ]; then
153+
export EESSI_SOFTWARE_SUBDIR_OVERRIDE=${{matrix.EESSI_SOFTWARE_SUBDIR_OVERRIDE}}
154+
source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash
155+
142156
echo "modules_results.json file exists, trying to fetch the license..."
143157
ml Python-bundle-PyPI/2023.06-GCCcore-12.3.0 BeautifulSoup/4.12.2-GCCcore-12.3.0 PyYAML/6.0-GCCcore-12.3.0
144158
python licenses/parse_licenses.py modules_results.json licenses/licenses.yml
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
easyconfigs:
22
- OSU-Micro-Benchmarks-7.2-gompi-2023a-CUDA-12.1.1.eb
3-
3+
- OTF2-3.0.3-GCCcore-12.3.0.eb
4+
- XlsxWriter-3.1.3-GCCcore-12.3.0.eb
5+
- spdlog-1.11.0-GCCcore-12.3.0.eb

0 commit comments

Comments
 (0)