Skip to content

Commit c981d31

Browse files
authored
Merge branch 'master' into fix-env
2 parents a8bea17 + a9a8bfe commit c981d31

27 files changed

+629
-159
lines changed

.github/copilot-instructions.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# GitHub Copilot Instructions
2+
3+
This repository builds container images for the Electron-Ion Collider (EIC) scientific software environment.
4+
5+
## Primary Reference
6+
7+
**For comprehensive guidance, see [`AGENTS.md`](../AGENTS.md) in the repository root.**
8+
9+
The `AGENTS.md` file contains detailed information about:
10+
- Repository architecture and build strategy
11+
- Spack package management conventions
12+
- Docker multi-stage build patterns
13+
- Coding conventions for Dockerfiles, shell scripts, and YAML
14+
- Common tasks and workflows
15+
- Testing and validation procedures
16+
17+
## Quick Reference
18+
19+
### Key Technologies
20+
21+
- **Spack** - Scientific package manager
22+
- **Docker/OCI** - Multi-stage, multi-architecture container builds
23+
- **GitHub Actions** - CI/CD pipeline
24+
- **BuildKit** - Advanced Docker build features with caching
25+
26+
### Essential Commands
27+
28+
```bash
29+
# Build stages locally
30+
docker buildx build --target builder_concretization_default -f containers/eic/Dockerfile .
31+
docker buildx build --target final -f containers/eic/Dockerfile .
32+
33+
# Spack environment activation
34+
spack env activate --dir <path>
35+
```
36+
37+
### File Modification Guidelines
38+
39+
When modifying files, follow these patterns:
40+
41+
**`spack-environment/packages.yaml`**
42+
- Use `@X.Y.Z:X` syntax for major version constraints
43+
- Maintain both `prefer` and `require` sections in `packages:all`
44+
- Use `any_of: [+variant, '@:']` pattern for optional variants
45+
46+
**`spack-packages.sh`**
47+
- Add cherry-pick commit hashes with descriptive comment: `## [hash]: [description]`
48+
49+
**Dockerfiles**
50+
- Use BuildKit syntax: `#syntax=docker/dockerfile:1.10`
51+
- Enable checks: `#check=error=true`
52+
- Use heredoc for multi-line RUN: `RUN <<EOF ... EOF`
53+
- Leverage mount caches for performance
54+
55+
### Version Updates
56+
57+
When updating package versions:
58+
1. Check if cherry-pick needed in `spack-packages.sh`
59+
2. Update version in `spack-environment/packages.yaml`
60+
3. Update in **both** `xl` and `cuda` subdirectories if epic-related
61+
62+
### Testing Changes
63+
64+
Before submitting:
65+
1. Test concretization with builder stage builds
66+
2. Verify no unexpected duplicate packages
67+
3. **Check BOTH CI workflows pass** (GitHub Actions AND GitLab/EICweb)
68+
4. Update documentation if architecture changes
69+
70+
### Dual CI Workflow
71+
72+
This repository uses **both** GitHub Actions and GitLab CI (EICweb):
73+
- **GitHub Actions**: Primary workflow for GitHub-hosted builds
74+
- **GitLab CI**: Mirrored workflow on `eicweb.phy.anl.gov` with dedicated hardware
75+
- **Both must pass** - passing one is necessary but not sufficient
76+
77+
## Registry Information
78+
79+
Images are published to:
80+
- **GitHub Container Registry**: `ghcr.io/eic/*`
81+
- **DockerHub** (optional): `docker.io/eicweb/*`
82+
83+
Buildcache stored at:
84+
- **GitLab Registry**: `eicweb.phy.anl.gov/containers/eic_container`
85+
86+
## Support
87+
88+
For detailed documentation, see the `docs/` directory or visit the [GitHub repository](https://github.com/eic/containers).

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/build-push.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ jobs:
107107
PLATFORM: linux/amd64
108108
runner: ubuntu-latest
109109
arch: amd64
110+
fail-fast: false
110111
steps:
111112
- name: Checkout
112-
uses: actions/checkout@v4
113+
uses: actions/checkout@v6
113114
- name: Inject enhanced GitHub environment variables
114115
uses: rlespinasse/github-slug-action@v5
115116
- name: Load spack version and cherry-picks
@@ -158,7 +159,7 @@ jobs:
158159
# This is separate from the registry cache which stores image layers
159160
# Reference: https://docs.docker.com/build/ci/github-actions/cache/#cache-mounts
160161
# Implementation: https://github.com/reproducible-containers/buildkit-cache-dance
161-
uses: actions/cache@v4
162+
uses: actions/cache@v5
162163
id: cache-base-mounts
163164
with:
164165
path: cache-mount-base-${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}
@@ -194,7 +195,7 @@ jobs:
194195
username: ${{ secrets.GHCR_REGISTRY_USER }}
195196
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
196197
- name: Build and push
197-
uses: docker/build-push-action@v5
198+
uses: docker/build-push-action@v6
198199
id: build
199200
with:
200201
file: containers/debian/Dockerfile
@@ -233,7 +234,7 @@ jobs:
233234
mkdir -p /tmp/digests
234235
echo "${{ steps.meta.outputs.tags }}@${{ steps.build.outputs.digest }}" > /tmp/digests/${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}.digest
235236
- name: Upload digest as artifact
236-
uses: actions/upload-artifact@v4
237+
uses: actions/upload-artifact@v6
237238
with:
238239
name: base-${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}-digest
239240
path: /tmp/digests/${{ matrix.BUILD_IMAGE }}-${{ matrix.arch }}.digest
@@ -269,7 +270,7 @@ jobs:
269270
username: ${{ secrets.GHCR_REGISTRY_USER }}
270271
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
271272
- name: Download all digest artifacts
272-
uses: actions/download-artifact@v4
273+
uses: actions/download-artifact@v7
273274
with:
274275
path: /tmp/digests
275276
pattern: base-${{ matrix.BUILD_IMAGE }}-*-digest
@@ -406,14 +407,15 @@ jobs:
406407
runner: ubuntu-latest
407408
PLATFORM: linux/amd64
408409
target: builder_concretization_default
410+
fail-fast: false
409411
steps:
410412
- name: Free Disk Space (Ubuntu)
411413
uses: jlumbroso/free-disk-space@v1.3.1
412414
with:
413415
android: true
414416
dotnet: true
415417
- name: Checkout
416-
uses: actions/checkout@v4
418+
uses: actions/checkout@v6
417419
- name: Resolve benchmarks versions
418420
id: benchmarks
419421
shell: bash
@@ -451,7 +453,7 @@ jobs:
451453
# This is separate from the registry cache which stores image layers
452454
# Reference: https://docs.docker.com/build/ci/github-actions/cache/#cache-mounts
453455
# Implementation: https://github.com/reproducible-containers/buildkit-cache-dance
454-
uses: actions/cache@v4
456+
uses: actions/cache@v5
455457
id: cache-eic-mounts
456458
with:
457459
path: cache-mount-eic-${{ matrix.arch }}
@@ -495,7 +497,7 @@ jobs:
495497
username: ${{ secrets.GHCR_REGISTRY_USER }}
496498
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
497499
- name: Build and push
498-
uses: docker/build-push-action@v5
500+
uses: docker/build-push-action@v6
499501
id: build
500502
with:
501503
file: containers/eic/Dockerfile
@@ -537,7 +539,7 @@ jobs:
537539
mkdir -p /tmp/digests
538540
echo "${{ steps.meta.outputs.tags }}@${{ steps.build.outputs.digest }}" > /tmp/digests/${{ matrix.arch }}.digest
539541
- name: Upload digest as artifact
540-
uses: actions/upload-artifact@v4
542+
uses: actions/upload-artifact@v6
541543
with:
542544
name: eic-${{ matrix.ENV }}-${{ matrix.arch }}-digest
543545
path: /tmp/digests/${{ matrix.arch }}.digest
@@ -571,7 +573,7 @@ jobs:
571573
username: ${{ secrets.GHCR_REGISTRY_USER }}
572574
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
573575
- name: Download all digest artifacts
574-
uses: actions/download-artifact@v4
576+
uses: actions/download-artifact@v7
575577
with:
576578
path: /tmp/digests
577579
pattern: eic-${{ matrix.ENV }}-*-digest

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@v6
3131

3232
- name: Setup Pages
33-
uses: actions/configure-pages@v4
33+
uses: actions/configure-pages@v5
3434

3535
- name: Upload artifact
36-
uses: actions/upload-pages-artifact@v3
36+
uses: actions/upload-pages-artifact@v4
3737
with:
3838
path: 'docs'
3939

.github/workflows/mirror.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
statuses: write
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1919
with:
2020
fetch-depth: 0
2121
- name: Push to EICweb

.gitlab-ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,7 @@ eic_xl:singularity:nightly:
620620
.benchmarks:default:
621621
extends: .benchmarks
622622
variables:
623-
- BUILD_TYPE: default
624-
- !reference ['.benchmarks', variables]
623+
BUILD_TYPE: default
625624
needs:
626625
- job: version
627626
- job: eic
@@ -639,8 +638,7 @@ eic_xl:singularity:nightly:
639638
.benchmarks:nightly:
640639
extends: .benchmarks
641640
variables:
642-
- BUILD_TYPE: nightly
643-
- !reference ['.benchmarks', variables]
641+
BUILD_TYPE: nightly
644642
needs:
645643
- job: version
646644
- job: eic

0 commit comments

Comments
 (0)