Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: macOS CI Build

on:
push:
branches:
- master
- macos-ci-workflow
pull_request:
branches:
- master
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read
packages: write

jobs:
build:
runs-on: macos-latest

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow specifies "macos-latest" but doesn't consider that different macOS versions may have different default compilers and system libraries. For a more robust CI setup, consider pinning to specific macOS versions (e.g., macos-13, macos-14) or documenting which version is expected, especially since the compiler matrix suggests compiler-specific testing.

Suggested change
runs-on: macos-latest
runs-on: macos-13

Copilot uses AI. Check for mistakes.
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compiler matrix variable is defined but never used in the workflow. The Spack compiler configuration relies on "spack -e ci compiler find" which will auto-detect available compilers. To properly test with different compilers as intended by the matrix strategy, the workflow should specify which compiler to use, likely through Spack's spec syntax or compiler configuration.

Copilot uses AI. Check for mistakes.

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace at the end of this line. This should be removed to maintain consistent formatting.

Suggested change

Copilot uses AI. Check for mistakes.
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace at the end of this line. This should be removed to maintain consistent formatting.

Suggested change

Copilot uses AI. Check for mistakes.
- name: Setup Spack
uses: spack/setup-spack@v2.1.1
with:
ref: develop

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Use the same spack version (and spack-packages version) that is used in the container build in this repository.

color: true
path: ${{ github.workspace }}/spack

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Apply the same cherry-picks that are used in the container build in this repository.


Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace at the end of this line. This should be removed to maintain consistent formatting.

Suggested change

Copilot uses AI. Check for mistakes.
- name: Add Spack environment
run: |
spack env create ci spack-environment/ci
spack env activate ci

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow activates the Spack environment with "spack env activate ci" but doesn't persist the activation for subsequent steps. Each "run" step in GitHub Actions starts a new shell session. The activation command needs to be repeated in each step that uses the environment, or use "spack -e ci" consistently as done in later steps.

Copilot uses AI. Check for mistakes.
spack -e ci compiler find
spack -e ci external find --not-buildable cmake
Comment on lines +96 to +98

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Use the same compiler and external package finding strategy as used in the container build in this repository.

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using --not-buildable with external find for cmake means that if cmake is not found externally, the build will fail. Consider whether this is intentional or if cmake should be allowed to be built by Spack as a fallback.

Suggested change
spack -e ci external find --not-buildable cmake
spack -e ci external find cmake

Copilot uses AI. Check for mistakes.

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace at the end of this line. This should be removed to maintain consistent formatting.

Suggested change

Copilot uses AI. Check for mistakes.
- name: Concretize
run: |
spack -e ci concretize -f

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace at the end of this line. This should be removed to maintain consistent formatting.

Suggested change

Copilot uses AI. Check for mistakes.
- name: Setup buildcache access
uses: spack/github-actions-buildcache@v2
with:
mode: readwrite
key: macos-${{ matrix.compiler }}-ci

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Use the same buildcache as used in the container build in this repository.


Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace at the end of this line. This should be removed to maintain consistent formatting.

Suggested change

Copilot uses AI. Check for mistakes.
- name: Install
run: |
spack -e ci install --no-check-signature --show-log-on-error

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace at the end of this line. This should be removed to maintain consistent formatting.

Suggested change

Copilot uses AI. Check for mistakes.
- name: Push to buildcache
if: always()
run: |
spack -e ci buildcache push --update-index --only=package --unsigned ${{ github.workspace }}/buildcache-macos

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The buildcache push command references a local directory path using github.workspace, but the github-actions-buildcache action at line 54 is configured with mode: readwrite and a key, which suggests it uses GitHub's cache. The push command should reference the buildcache location configured by the action, or the workflow should be updated to ensure consistency between the buildcache setup and push operations.

Suggested change
spack -e ci buildcache push --update-index --only=package --unsigned ${{ github.workspace }}/buildcache-macos
spack -e ci buildcache push --update-index --only=package --unsigned

Copilot uses AI. Check for mistakes.

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace at the end of this line. This should be removed to maintain consistent formatting.

Copilot uses AI. Check for mistakes.
- name: Show environment info
if: always()
run: |
spack -e ci find -lv
spack -e ci graph --dot > ci-graph.dot

Copilot AI Dec 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is trailing whitespace at the end of this line. This should be removed to maintain consistent formatting.

Suggested change
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Spack
uses: spack/setup-spack@v2.1.1
with:
ref: develop
color: true
path: ${{ github.workspace }}/spack
- name: Add Spack environment
run: |
spack env create ci spack-environment/ci
spack env activate ci
spack -e ci compiler find
spack -e ci external find --not-buildable cmake
- name: Concretize
run: |
spack -e ci concretize -f
- name: Setup buildcache access
uses: spack/github-actions-buildcache@v2
with:
mode: readwrite
key: macos-${{ matrix.compiler }}-ci
- name: Install
run: |
spack -e ci install --no-check-signature --show-log-on-error
- name: Push to buildcache
if: always()
run: |
spack -e ci buildcache push --update-index --only=package --unsigned ${{ github.workspace }}/buildcache-macos
- name: Show environment info
if: always()
run: |
spack -e ci find -lv
spack -e ci graph --dot > ci-graph.dot
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Spack
uses: spack/setup-spack@v2.1.1
with:
ref: develop
color: true
path: ${{ github.workspace }}/spack
- name: Add Spack environment
run: |
spack env create ci spack-environment/ci
spack env activate ci
spack -e ci compiler find
spack -e ci external find --not-buildable cmake
- name: Concretize
run: |
spack -e ci concretize -f
- name: Setup buildcache access
uses: spack/github-actions-buildcache@v2
with:
mode: readwrite
key: macos-${{ matrix.compiler }}-ci
- name: Install
run: |
spack -e ci install --no-check-signature --show-log-on-error
- name: Push to buildcache
if: always()
run: |
spack -e ci buildcache push --update-index --only=package --unsigned ${{ github.workspace }}/buildcache-macos
- name: Show environment info
if: always()
run: |
spack -e ci find -lv
spack -e ci graph --dot > ci-graph.dot

Copilot uses AI. Check for mistakes.
- name: Upload environment graph
if: always()
uses: actions/upload-artifact@v4
with:
name: ci-environment-graph-${{ matrix.compiler }}
path: ci-graph.dot

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Ditch the environment graph.

Loading