diff --git a/.github/workflows/build_linux_cuda_tfel.yml b/.github/workflows/build_linux_cuda_tfel.yml new file mode 100644 index 000000000..93653b4a8 --- /dev/null +++ b/.github/workflows/build_linux_cuda_tfel.yml @@ -0,0 +1,86 @@ +name: CI with TFEL and CUDA support on Ubuntu + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + + - name: Install CUDA + uses: Jimver/cuda-toolkit@v0.2.36 + with: + id: cuda-toolkit + + - name: Print CUDA version + run: | + echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}" + echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}" + + - name: Checkout TFEL + uses: actions/checkout@v7 + with: + repository: thelfer/tfel + path: tfel + + - name: Checkout MGIS + uses: actions/checkout@v7 + with: + path: mgis + + - name: Install TFEL + run: | + cmake ${{github.workspace}}/tfel \ + -B ${{github.workspace}}/build-tfel \ + -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install-tfel + cmake --build ${{github.workspace}}/build-tfel --target all -j $(nproc) + cmake --build ${{github.workspace}}/build-tfel --target install + + - name: Configure + run: | + source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh + cmake ${{github.workspace}}/mgis \ + -B ${{github.workspace}}/build \ + -DCMAKE_BUILD_TYPE=Release \ + -Denable-c-bindings=ON \ + -Denable-fortran-bindings=ON \ + -Denable-python-bindings=OFF \ + -Denable-portable-build=ON \ + -Denable-julia-bindings=OFF \ + -Denable-parallel-stl-algorithms=OFF \ + -Denable-cuda-algorithms=ON \ + -DTFEL_DIR=${{github.workspace}}/install-tfel/share/tfel/cmake \ + -DCMAKE_CUDA_COMPILER=nvcc \ + -DCUDA_ARCHITECTURES=native + + - name: Compile + run: | + source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh + cmake --build ${{github.workspace}}/build --target all -j $(nproc) + + # - name: Test + # run: | + # source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh + # cmake --build ${{github.workspace}}/build --target check -j $(nproc) + + # - name: Print test log on failure + # if: failure() + # run: | + # cat ${{github.workspace}}/build/Testing/Temporary/*.log + + # - name: Publish test report + # uses: mikepenz/action-junit-report@v6 + # if: success() || failure() # always run even if the previous step fails + # with: + # report_paths: '**/build/tests/*.xml' diff --git a/.github/workflows/build_unix_with_tfel.yml b/.github/workflows/build_unix_with_tfel.yml new file mode 100644 index 000000000..04962ae04 --- /dev/null +++ b/.github/workflows/build_unix_with_tfel.yml @@ -0,0 +1,76 @@ +name: CI with TFEL support on Ubuntu + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + + steps: + + - name: Checkout TFEL + uses: actions/checkout@v7 + with: + repository: thelfer/tfel + path: tfel + + - name: Checkout MGIS + uses: actions/checkout@v7 + with: + path: mgis + + - name: Install TFEL + run: | + cmake ${{github.workspace}}/tfel \ + -B ${{github.workspace}}/build-tfel \ + -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install-tfel + cmake --build ${{github.workspace}}/build-tfel --target all -j $(nproc) + cmake --build ${{github.workspace}}/build-tfel --target install + + - name: Configure + run: | + source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh + cmake ${{github.workspace}}/mgis \ + -B ${{github.workspace}}/build \ + -DCMAKE_BUILD_TYPE=Release \ + -Denable-c-bindings=ON \ + -Denable-fortran-bindings=ON \ + -Denable-python-bindings=OFF \ + -Denable-portable-build=ON \ + -Denable-julia-bindings=OFF \ + -DTFEL_DIR=${{github.workspace}}/install-tfel/share/tfel/cmake \ + -Denable-parallel-stl-algorithms=OFF + + - name: Compile + run: | + source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh + cmake --build ${{github.workspace}}/build --target all -j $(nproc) + + - name: Test + run: | + source ${{github.workspace}}/install-tfel/share/tfel/env/env.sh + cmake --build ${{github.workspace}}/build --target check -j $(nproc) + + - name: Print test log on failure + if: failure() + run: | + cat ${{github.workspace}}/build/Testing/Temporary/*.log + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v6 + if: success() || failure() # always run even if the previous step fails + with: + report_paths: '**/build/tests/*.xml' diff --git a/.github/workflows/build_win_mingw.yml b/.github/workflows/build_win_mingw.yml new file mode 100644 index 000000000..8ee1e3170 --- /dev/null +++ b/.github/workflows/build_win_mingw.yml @@ -0,0 +1,29 @@ +name: Windows MinGW build +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + msys2-ucrt64: + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + steps: + - uses: actions/checkout@v3 + - uses: msys2/setup-msys2@v2 + with: + msystem: UCRT64 + update: true + 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 + - name: Configure CMake + run: + cmake -B ${{github.workspace}}/build -GNinja -DCMAKE_BUILD_TYPE=Release -Denable-c-bindings=ON -Denable-fortran-bindings=ON -Denable-python-bindings=OFF + - name: Build + run: + cmake --build ${{github.workspace}}/build -j $(nproc) + - name: Check + run: + cmake --build ${{github.workspace}}/build --target=check -j $(nproc) diff --git a/.github/workflows/build_win_msvc.yml b/.github/workflows/build_win_msvc.yml new file mode 100644 index 000000000..e1acdfb4f --- /dev/null +++ b/.github/workflows/build_win_msvc.yml @@ -0,0 +1,25 @@ +name: Windows Visual Studio build +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + Visual-Studio-build-and-check: + strategy: + matrix: + os: [windows-2022, windows-2025-vs2026] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -Denable-c-bindings=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + - name: Build + run: cmake --build ${{github.workspace}}/build --target=ALL_BUILD --config ${{env.BUILD_TYPE}} -j $(nproc) + - name: Check + run: cmake --build ${{github.workspace}}/build --target=check --config ${{env.BUILD_TYPE}} -j $(nproc) diff --git a/.github/workflows/check-tbb.yml b/.github/workflows/check-tbb.yml index 454c4f307..8e479c28d 100644 --- a/.github/workflows/check-tbb.yml +++ b/.github/workflows/check-tbb.yml @@ -1,4 +1,4 @@ -name: CI with TFEL and TBB support on Linux +name: CI with TFEL and TBB support on Linux (spack) on: push: diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 77f00f320..5a1e72a3f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: CI with TFEL support on Ubuntu +name: CI with TFEL support on Ubuntu (spack) on: push: