Skip to content

Commit eb8dde4

Browse files
authored
Merge pull request #225 from thelfer/224-github-actions-add-support-actions-based-on-mac-os-windowsvisual-studio-and-windowsminggw
Add CI on Windows with Visual Studio and Mingw
2 parents 5f1a730 + eb9e992 commit eb8dde4

6 files changed

Lines changed: 218 additions & 2 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: CI with TFEL and CUDA support on Ubuntu
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
11+
BUILD_TYPE: Release
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
20+
- name: Install CUDA
21+
uses: Jimver/cuda-toolkit@v0.2.36
22+
with:
23+
id: cuda-toolkit
24+
25+
- name: Print CUDA version
26+
run: |
27+
echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}"
28+
echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
29+
30+
- name: Checkout TFEL
31+
uses: actions/checkout@v7
32+
with:
33+
repository: thelfer/tfel
34+
path: tfel
35+
36+
- name: Checkout MGIS
37+
uses: actions/checkout@v7
38+
with:
39+
path: mgis
40+
41+
- name: Install TFEL
42+
run: |
43+
cmake ${{github.workspace}}/tfel \
44+
-B ${{github.workspace}}/build-tfel \
45+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
46+
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install-tfel
47+
cmake --build ${{github.workspace}}/build-tfel --target all -j $(nproc)
48+
cmake --build ${{github.workspace}}/build-tfel --target install
49+
50+
- name: Configure
51+
run: |
52+
source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh
53+
cmake ${{github.workspace}}/mgis \
54+
-B ${{github.workspace}}/build \
55+
-DCMAKE_BUILD_TYPE=Release \
56+
-Denable-c-bindings=ON \
57+
-Denable-fortran-bindings=ON \
58+
-Denable-python-bindings=OFF \
59+
-Denable-portable-build=ON \
60+
-Denable-julia-bindings=OFF \
61+
-Denable-parallel-stl-algorithms=OFF \
62+
-Denable-cuda-algorithms=ON \
63+
-DTFEL_DIR=${{github.workspace}}/install-tfel/share/tfel/cmake \
64+
-DCMAKE_CUDA_COMPILER=nvcc \
65+
-DCUDA_ARCHITECTURES=native
66+
67+
- name: Compile
68+
run: |
69+
source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh
70+
cmake --build ${{github.workspace}}/build --target all -j $(nproc)
71+
72+
# - name: Test
73+
# run: |
74+
# source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh
75+
# cmake --build ${{github.workspace}}/build --target check -j $(nproc)
76+
77+
# - name: Print test log on failure
78+
# if: failure()
79+
# run: |
80+
# cat ${{github.workspace}}/build/Testing/Temporary/*.log
81+
82+
# - name: Publish test report
83+
# uses: mikepenz/action-junit-report@v6
84+
# if: success() || failure() # always run even if the previous step fails
85+
# with:
86+
# report_paths: '**/build/tests/*.xml'
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI with TFEL support on Ubuntu
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
11+
BUILD_TYPE: Release
12+
13+
jobs:
14+
build:
15+
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest]
19+
runs-on: ${{ matrix.os }}
20+
21+
steps:
22+
23+
- name: Checkout TFEL
24+
uses: actions/checkout@v7
25+
with:
26+
repository: thelfer/tfel
27+
path: tfel
28+
29+
- name: Checkout MGIS
30+
uses: actions/checkout@v7
31+
with:
32+
path: mgis
33+
34+
- name: Install TFEL
35+
run: |
36+
cmake ${{github.workspace}}/tfel \
37+
-B ${{github.workspace}}/build-tfel \
38+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
39+
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install-tfel
40+
cmake --build ${{github.workspace}}/build-tfel --target all -j $(nproc)
41+
cmake --build ${{github.workspace}}/build-tfel --target install
42+
43+
- name: Configure
44+
run: |
45+
source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh
46+
cmake ${{github.workspace}}/mgis \
47+
-B ${{github.workspace}}/build \
48+
-DCMAKE_BUILD_TYPE=Release \
49+
-Denable-c-bindings=ON \
50+
-Denable-fortran-bindings=ON \
51+
-Denable-python-bindings=OFF \
52+
-Denable-portable-build=ON \
53+
-Denable-julia-bindings=OFF \
54+
-DTFEL_DIR=${{github.workspace}}/install-tfel/share/tfel/cmake \
55+
-Denable-parallel-stl-algorithms=OFF
56+
57+
- name: Compile
58+
run: |
59+
source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh
60+
cmake --build ${{github.workspace}}/build --target all -j $(nproc)
61+
62+
- name: Test
63+
run: |
64+
source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh
65+
cmake --build ${{github.workspace}}/build --target check -j $(nproc)
66+
67+
- name: Print test log on failure
68+
if: failure()
69+
run: |
70+
cat ${{github.workspace}}/build/Testing/Temporary/*.log
71+
72+
- name: Publish Test Report
73+
uses: mikepenz/action-junit-report@v6
74+
if: success() || failure() # always run even if the previous step fails
75+
with:
76+
report_paths: '**/build/tests/*.xml'
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Windows MinGW build
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
8+
jobs:
9+
msys2-ucrt64:
10+
runs-on: windows-latest
11+
defaults:
12+
run:
13+
shell: msys2 {0}
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: msys2/setup-msys2@v2
17+
with:
18+
msystem: UCRT64
19+
update: true
20+
install: git mingw-w64-ucrt-x86_64-gnuplot mingw-w64-ucrt-x86_64-gcc-libgfortran mingw-w64-ucrt-x86_64-gcc-fortran mingw-w64-ucrt-x86_64-cc mingw-w64-ucrt-x86_64-cc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja
21+
- name: Configure CMake
22+
run:
23+
cmake -B ${{github.workspace}}/build -GNinja -DCMAKE_BUILD_TYPE=Release -Denable-c-bindings=ON -Denable-fortran-bindings=ON -Denable-python-bindings=OFF
24+
- name: Build
25+
run:
26+
cmake --build ${{github.workspace}}/build -j $(nproc)
27+
- name: Check
28+
run:
29+
cmake --build ${{github.workspace}}/build --target=check -j $(nproc)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Windows Visual Studio build
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
8+
env:
9+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
Visual-Studio-build-and-check:
14+
strategy:
15+
matrix:
16+
os: [windows-2022, windows-2025-vs2026]
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Configure CMake
21+
run: cmake -B ${{github.workspace}}/build -Denable-c-bindings=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
22+
- name: Build
23+
run: cmake --build ${{github.workspace}}/build --target=ALL_BUILD --config ${{env.BUILD_TYPE}} -j $(nproc)
24+
- name: Check
25+
run: cmake --build ${{github.workspace}}/build --target=check --config ${{env.BUILD_TYPE}} -j $(nproc)

.github/workflows/check-tbb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI with TFEL and TBB support on Linux
1+
name: CI with TFEL and TBB support on Linux (spack)
22

33
on:
44
push:

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI with TFEL support on Ubuntu
1+
name: CI with TFEL support on Ubuntu (spack)
22

33
on:
44
push:

0 commit comments

Comments
 (0)