Skip to content
Draft
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
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@ jobs:
- x64
julia_version:
- '1.10'
- '1.11'
- '1.12'
t8code_version:
- '3.0.1'
include:
- os: ubuntu-latest
test_type: coverage
arch: x64
julia_version: '1.11'
julia_version: '1.12'
t8code_version: '3.0.1'
env:
# Necessary for HDF5 to play nice with Julia
LD_PRELOAD: /lib/x86_64-linux-gnu/libcurl.so.4
# Necessary for HDF5 to play nice with Julia 1.10
# https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#example
LD_PRELOAD: ${{ matrix.julia_version == '1.10' && '/lib/x86_64-linux-gnu/libcurl.so.4' || '' }}
# Necessary such that libtrixi will not use its own default for the depot path
JULIA_DEPOT_PATH: ~/.julia
steps:
Expand Down Expand Up @@ -115,22 +116,27 @@ jobs:
- name: Configure (test_type == 'regular')
if: ${{ matrix.test_type == 'regular' }}
run: |
# remove once https://github.com/JuliaLang/julia/pull/57681 is in the release
C_FLAGS=${{ matrix.julia_version == '1.12' && '-Wno-error=unused-parameter' || '' }}
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../install \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="${C_FLAGS}" \
-DT8CODE_ROOT=$PWD/../t8code-local/prefix \
-DENABLE_TESTING=ON -DJULIA_PROJECT_PATH=../libtrixi-julia

- name: Configure (test_type == 'coverage')
if: ${{ matrix.test_type == 'coverage' }}
run: |
# remove once https://github.com/JuliaLang/julia/pull/57681 is in the release
C_FLAGS=${{ matrix.julia_version == '1.12' && '-Wno-error=unused-parameter' || '' }}
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../install \
-DCMAKE_BUILD_TYPE=Debug \
-DT8CODE_ROOT=$PWD/../t8code-local/prefix \
-DCMAKE_C_FLAGS="-cpp --coverage -O0" \
-DCMAKE_C_FLAGS="-cpp --coverage -O0 ${C_FLAGS}" \
-DCMAKE_Fortran_FLAGS="-cpp --coverage -O0" \
-DCMAKE_EXE_LINKER_FLAGS="--coverage" \
-DCMAKE_SHARED_LINKER_FLAGS="--coverage" \
Expand Down Expand Up @@ -205,7 +211,7 @@ jobs:
if: ${{ matrix.test_type == 'package-compiler' }}
run: |
cd build
make -j2
make
du -hL ./prefix-pc/lib/libtrixi.so

- name: Test external CMake project
Expand Down Expand Up @@ -313,6 +319,8 @@ jobs:
cd build/test/c
ctest -V
env:
# This seems to fix stalling tests with Julia 1.12
JULIA_NUM_THREADS: 1
LIBTRIXI_DEBUG: all
GTEST_COLOR: 'yes'

Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ if( USE_PACKAGE_COMPILER )
COMMENT "Building ${PROJECT_NAME} with PackageCompiler.jl..."
COMMAND ${JULIA_EXECUTABLE}
--project=${CMAKE_SOURCE_DIR}/LibTrixi.jl/lib
--threads=1
${CMAKE_SOURCE_DIR}/LibTrixi.jl/lib/build.jl
${JULIA_PROJECT_PATH}
${CMAKE_BINARY_DIR}/prefix-pc
Expand Down
3 changes: 1 addition & 2 deletions LibTrixi.jl/src/api_jl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ function trixi_initialize_simulation_jl(filename)

# Initialize simulation state
# Note: we need `invokelatest` here since the function is dynamically upon `include`
# Note: `invokelatest` is not exported until Julia v1.9, thus we call it through `Base`
simstate = Base.invokelatest(Main.init_simstate)
simstate = @invokelatest Main.init_simstate()

if show_debug_output()
println("Simulation state initialized")
Expand Down
Loading