Skip to content

Commit 2e1ebf1

Browse files
authored
Create main.yml
1 parent db4e10f commit 2e1ebf1

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/main.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Use Compute Canada CVMFS Software Stack
2+
3+
on:
4+
workflow_dispatch: # Allows you to run this manually from the Actions tab
5+
6+
jobs:
7+
build-with-alliance-stack:
8+
name: Build with Alliance/Compute Canada Software
9+
runs-on: ubuntu-latest # This works on standard GitHub runners
10+
11+
steps:
12+
- name: 🛠️ Checkout Repository
13+
uses: actions/checkout@v4
14+
15+
# 1. This is the key step that sets up CVMFS
16+
# We specify the repository names for the Digital Research Alliance of Canada.
17+
- name: 📂 Mount Compute Canada CVMFS Repositories
18+
uses: cvmfs-contrib/github-action-cvmfs@v2
19+
with:
20+
cvmfs_repositories: 'soft.computecanada.ca,containers.computecanada.ca'
21+
22+
# 2. Verify the mount and initialize the software environment
23+
# This is the standard procedure for using their software stack.
24+
- name: ✅ Verify Mount & Initialize Environment
25+
run: |
26+
echo "--- Verifying CVMFS mounts are available ---"
27+
ls /cvmfs/
28+
if [ ! -d "/cvmfs/soft.computecanada.ca" ]; then
29+
echo "❌ ERROR: CVMFS repository 'soft.computecanada.ca' not found!"
30+
exit 1
31+
fi
32+
echo "✅ CVMFS mounts look good."
33+
34+
echo ""
35+
echo "--- Sourcing the Alliance/Compute Canada environment profile ---"
36+
# This script sets up the 'module' command and other environment variables
37+
source /cvmfs/soft.computecanada.ca/config/profile/bash.sh
38+
39+
echo "--- Checking module system version ---"
40+
module --version
41+
42+
# 3. Use the software stack
43+
# Now you can use the 'module' command just like on a cluster.
44+
- name: ⚙️ Use Software from CVMFS
45+
run: |
46+
echo "--- Sourcing the environment again for this step ---"
47+
# Each 'run' step is a new shell, so you must source the setup script again
48+
source /cvmfs/soft.computecanada.ca/config/profile/bash.sh
49+
50+
echo "--- Searching for available GCC modules ---"
51+
module avail gcc
52+
53+
echo ""
54+
echo "--- Loading a specific GCC module and checking its version ---"
55+
module load gcc/12.3
56+
gcc --version

0 commit comments

Comments
 (0)