Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
57 changes: 57 additions & 0 deletions .github/actions/setup-build-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Setup Build Environment
description: Sets up NVHPC and pixi for building SlaterGPU and dependent projects

inputs:
use-latest-pixi:
description: Use latest pixi version instead of the minimum from pixi.toml (for scheduled builds)
required: false
default: 'false'

runs:
using: composite
steps:
- name: Extract minimum pixi version from pixi.toml
id: pixi-version
if: ${{ inputs.use-latest-pixi != 'true' }}
shell: bash
run: |
VERSION=$(grep 'requires-pixi' pixi.toml | sed 's/.*>=\([0-9.]*\).*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Minimum pixi version from pixi.toml: $VERSION"

- name: Set up Pixi (minimum version)
if: ${{ inputs.use-latest-pixi != 'true' }}
uses: prefix-dev/setup-pixi@v0.9.1
with:
pixi-version: v${{ steps.pixi-version.outputs.version }}
log-level: v
run-install: false
# cache: true
continue-on-error: true

- name: Set up Pixi (latest version for scheduled builds)
if: ${{ inputs.use-latest-pixi == 'true' }}
uses: prefix-dev/setup-pixi@v0.9.1
with:
log-level: v
run-install: false
# cache: true
continue-on-error: true

# Cache NVHPC installation
- name: Cache NVHPC
id: cache-nvhpc
uses: actions/cache@v4
with:
path: |
/home/runner/work/Linux_x86_64
/home/runner/work/modulefiles
key: nvhpc-25.1-cuda-12.6-v1-${{ runner.os }}

- name: Install nvhpc
shell: bash
run: |
source ${{ github.action_path }}/install_nvhpc.sh
env:
CACHE_HIT: ${{ steps.cache-nvhpc.outputs.cache-hit }}
continue-on-error: true
48 changes: 5 additions & 43 deletions .github/workflows/slater-gpu-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,53 +17,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Extract minimum pixi version from pixi.toml
id: pixi-version
run: |
VERSION=$(grep 'requires-pixi' pixi.toml | sed 's/.*>=\([0-9.]*\).*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Using minimum pixi version: $VERSION"

- name: Set up Pixi (minimum version)
if: ${{ !inputs.use-latest-pixi }}
uses: prefix-dev/setup-pixi@v0.9.1
with:
pixi-version: v${{ steps.pixi-version.outputs.version }}
log-level: v
run-install: false
# cache: true
continue-on-error: true

- name: Set up Pixi (latest version for scheduled builds)
if: ${{ inputs.use-latest-pixi }}
uses: prefix-dev/setup-pixi@v0.9.1
- name: Setup build environment
uses: ./.github/actions/setup-build-env
with:
log-level: v
run-install: false
# cache: true
continue-on-error: true

# Cache NVHPC installation
- name: Cache NVHPC
id: cache-nvhpc
uses: actions/cache@v4
with:
path: |
/home/runner/work/Linux_x86_64
/home/runner/work/modulefiles
key: nvhpc-25.1-cuda-12.6-v1-${{ runner.os }}

- name: Install nvhpc
run: |
source .github/workflows/install_nvhpc.sh
env:
CACHE_HIT: ${{ steps.cache-nvhpc.outputs.cache-hit }}
continue-on-error: true
use-latest-pixi: ${{ inputs.use-latest-pixi }}

- name: Install and test SlaterGPU
run: |
source ~/.pixi/envs/environment-modules/init/bash
module load ~/work/modulefiles/nvhpc/25.1
module list
pixi -vv install
pixi -vv run test-in-gh-action
pixi -v install
pixi -v run test-in-gh-action