Artifacts/docker #88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: linux-amdflang-cmake | |
on: | |
push: | |
branches: | |
- master | |
- main | |
paths-ignore: | |
- 'AUTHORS.md' | |
- 'LICENSE.md' | |
- 'README.md' | |
pull_request: | |
paths-ignore: | |
- 'AUTHORS.md' | |
- 'LICENSE.md' | |
- 'README.md' | |
jobs: | |
linux-tests: | |
timeout-minutes: 30 | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
name: ${{ matrix.os }} - ${{ matrix.fcompiler }} - ${{ matrix.build_type }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
fcompiler: amdflang | |
ccompiler: amdclang | |
spack_compiler: rocmcc@=6.1.1 | |
spack_os: "ubuntu:22.04" | |
shell: bash | |
build_type: debug | |
memcheck: false | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up ROCm | |
run: | | |
sudo apt update -y | |
wget https://repo.radeon.com/amdgpu-install/6.1.1/ubuntu/jammy/amdgpu-install_6.1.60101-1_all.deb | |
sudo apt install -y ./amdgpu-install_6.1.60101-1_all.deb | |
sudo amdgpu-install --accept-eula -y --usecase=openmpsdk --no-dkms | |
- name: Show version information | |
run: | | |
export PATH=${PATH}:/opt/rocm/bin | |
${{ matrix.fcompiler }} --version | |
${{ matrix.ccompiler }} --version | |
- name: Set up Spack | |
uses: spack/setup-spack@v2 | |
- name: Install dependencies in spack environment | |
run: | | |
export PATH=${PATH}:/opt/rocm/bin | |
spack -e ./share/spack-env/ mirror set --oci-username ${{ github.actor }} --oci-password "${{ secrets.GITHUB_TOKEN }}" local-buildcache | |
spack -e ./share/spack-env/ compiler find /opt/rocm/bin | |
spack -e ./share/spack-env/ external find --not-buildable | |
spack -e ./share/spack-env/ config add packages:feq-parse:require:["'%${{ matrix.spack_compiler }}'"] | |
spack -e ./share/spack-env/ config add packages:hdf5:require:["'%${{ matrix.spack_compiler }}'"] | |
spack -e ./share/spack-env/ config add packages:openmpi:require:["'%${{ matrix.spack_compiler }}'"] | |
sed -i 's/fc: null/fc: \/opt\/rocm\/bin\/amdflang/g' ./share/spack-env/spack.yaml | |
sed -i 's/f77: null/f77: \/opt\/rocm\/bin\/amdflang/g' ./share/spack-env/spack.yaml | |
spack -e ./share/spack-env/ concretize -f | |
spack -e ./share/spack-env/ install --no-check-signature | |
- name: Build with Cmake | |
shell: spack-bash {0} | |
run: | | |
export PATH=${PATH}:/opt/rocm/bin | |
spack env activate ./share/spack-env/ | |
mkdir build | |
cd build | |
FC=${{ matrix.fcompiler }} CC=${{ matrix.ccompiler }} \ | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DSELF_MPIEXEC_NUMPROCS=2 \ | |
../ | |
make VERBOSE=1 | |
- name: Run ctests | |
run: | | |
export WORKSPACE=/home/runner/work/SELF/SELF/ | |
ctest --verbose \ | |
--output-on-failure \ | |
--test-dir ./build/ | |
- name: Push packages and update index | |
run: | | |
spack -e ./share/spack-env/ mirror set --push --oci-username ${{ github.actor }} --oci-password "${{ secrets.GITHUB_TOKEN }}" local-buildcache | |
spack -e ./share/spack-env/ buildcache push --base-image ${{ matrix.spack_os }} --update-index local-buildcache | |
if: ${{ !cancelled() }} |