Skip to content

Commit

Permalink
Move to msys2 shell from github bash shell.
Browse files Browse the repository at this point in the history
  • Loading branch information
WardF committed Apr 15, 2024
1 parent f2c77aa commit 0f0468c
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
# Each step in the job.
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
Expand All @@ -38,7 +41,7 @@ jobs:
auto-activate-base: true

- name: Set up Paths and env
shell: bash -el {0}
shell: msys2 {0}
run: |
echo "" >> ~/.bash_profile
cat ~/.bash_profile
Expand All @@ -59,14 +62,14 @@ jobs:
conda config --add channels conda-forge
conda update conda
conda install hdf5=${{ matrix.hdf5 }} m2-m4 libxml2
shell: bash -el {0}
shell: msys2 {0}

# Double-check something
- name: Check Miniconda
run: |
which h5dump
which m4
shell: bash -el {0}
shell: msys2 {0}

# Check current directory
- name: Query Current Environment
Expand All @@ -80,71 +83,71 @@ jobs:
ls $CONDA_PREFIX/Library
echo ""
ls $CONDA_PREFIX/Library/include/
shell: bash -el {0}
shell: msys2 {0}

- name: Perform out-of-directory configuration
shell: bash -el {0}
shell: msys2 {0}
run: |
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH="${CONDA_PREFIX}/Library" -DCMAKE_C_FLAGS="-I${CONDA_PREFIX}/Library/include" -DCMAKE_INSTALL_PREFIX=~/tmp -DNETCDF_ENABLE_FILTER_TESTING=OFF
if: ${{ success() }}

- name: View cache - configuration
shell: bash -el {0}
shell: msys2 {0}
run: |
cd build
cmake -L .
if: ${{ success() }}

- name: Print Summary
shell: bash -l {0}
shell: msys2 {0}
run: |
cd build
cat libnetcdf.settings
- name: Perform out-of-directory build - libnetcdf
shell: bash -el {0}
shell: msys2 {0}
run: |
cd build
cmake --build . --config Release --target netcdf -j 4
- name: Perform out-of-directory install - libnetcdf
shell: bash -el {0}
shell: msys2 {0}
run: |
cd build
cmake --build . --config Release --target install -j 4
if: ${{ success() }}

- name: View config.h - libnetcdf failure
shell: bash -el {0}
shell: msys2 {0}
run: |
cd build
cat config.h
if: ${{ failure() }}

- name: Perform out-of-directory build - test suite
shell: bash -el {0}
shell: msys2 {0}
run: |
cd build
cmake --build . --config Release -j 4
if: ${{ success() }}

- name: View config.h - tests failure failure
shell: bash -el {0}
shell: msys2 {0}
run: |
cd build
cat config.h
if: ${{ failure() }}

- name: Prepare ctest Paths and env
shell: bash -el {0}
shell: msys2 {0}
run: |
cat ~/.bash_profile
echo "" >> ~/.bash_profile
- name: Run ctest
shell: bash -el {0}
shell: msys2 {0}
run: |
echo "Run ctest PATH: $PATH"
echo "Run ctest combined PATH: $PATH"
Expand All @@ -153,7 +156,7 @@ jobs:
PATH=~/tmp/bin:$PATH ctest . -j 4 --output-on-failure
- name: Verbose Output if CTest Failure
shell: bash -el {0}
shell: msys2 {0}
run: |
cd build
PATH=~/tmp/bin:$PATH ctest . --rerun-failed --output-on-failure -VV
Expand Down

0 comments on commit 0f0468c

Please sign in to comment.