From 64fb408c3d68c59683862d6d2b67837ede324807 Mon Sep 17 00:00:00 2001 From: patrickersing Date: Mon, 29 Apr 2024 10:42:01 +0200 Subject: [PATCH 1/4] split testsets and restrict coverage tests to ubuntu --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++---- test/runtests.jl | 14 +++++++++++++- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1b01b0..bf74b48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ permissions: jobs: test: if: "!contains(github.event.head_commit.message, 'skip ci')" - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: ${{ matrix.trixi_test }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -49,6 +49,13 @@ jobs: - windows-latest arch: - x64 + trixi_test: + - tree_1d + - tree_2d + - structured_2d + - unstructured_2d + - unit + - upstream steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 @@ -62,19 +69,35 @@ jobs: uses: julia-actions/julia-runtest@v1 with: coverage: false + env: + PYTHON: "" + TRIXI_TEST: ${{ matrix.trixi_test }} - name: Run tests with coverage + if: matrix.os == 'ubuntu-latest' && matrix.version == '1.10' uses: julia-actions/julia-runtest@v1 with: coverage: true - - uses: julia-actions/julia-processcoverage@v1 + env: + PYTHON: "" + TRIXI_TEST: ${{ matrix.trixi_test }} + - name: Process coverage results + # Only run coverage on Ubuntu + if: matrix.os == 'ubuntu-latest' + uses: julia-actions/julia-processcoverage@v1 with: directories: src,examples - - uses: codecov/codecov-action@v4 + - name: Upload coverage report to Codecov + # Only run coverage on Ubuntu + if: matrix.os == 'ubuntu-latest' + uses: codecov/codecov-action@v4 with: files: lcov.info env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # now required for public repos - - uses: coverallsapp/github-action@v2 + - name: Upload coverage report to Coveralls + # Only run coverage on Ubuntu + if: matrix.os == 'ubuntu-latest' + uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: ./lcov.info diff --git a/test/runtests.jl b/test/runtests.jl index d501312..7b44fac 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,11 +7,23 @@ using Test const TRIXI_TEST = get(ENV, "TRIXI_TEST", "all") @time @testset "TrixiShallowWater.jl tests" begin - @time if TRIXI_TEST == "all" + @time if TRIXI_TEST == "all" || TRIXI_TEST == "tree_1d" include("test_tree_1d.jl") + end + + @time if TRIXI_TEST == "all" || TRIXI_TEST == "tree_2d" include("test_tree_2d.jl") + end + + @time if TRIXI_TEST == "all" || TRIXI_TEST == "unstructured_2d" include("test_unstructured_2d.jl") + end + + @time if TRIXI_TEST == "all" || TRIXI_TEST == "structured_2d" include("test_structured_2d.jl") + end + + @time if TRIXI_TEST == "all" || TRIXI_TEST == "unit" include("test_unit.jl") end From bca2f959318a378d7b17d5e70a9b63e98128412c Mon Sep 17 00:00:00 2001 From: patrickersing Date: Mon, 29 Apr 2024 13:06:34 +0200 Subject: [PATCH 2/4] separate coverage tests, restrict macOS/windows to upstream --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf74b48..93f3710 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,8 +45,6 @@ jobs: - '1.10' os: - ubuntu-latest - - macOS-latest - - windows-latest arch: - x64 trixi_test: @@ -56,6 +54,14 @@ jobs: - unstructured_2d - unit - upstream + include: + - version: '1.10' + os: + - macOS-latest + - windows-latest + arch: x64 + trixi_test: + - upstream steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 @@ -72,8 +78,36 @@ jobs: env: PYTHON: "" TRIXI_TEST: ${{ matrix.trixi_test }} + + test_coverage: + if: "!contains(github.event.head_commit.message, 'skip ci')" + name: coverage - ${{ matrix.trixi_test }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.10' + os: + - ubuntu-latest + arch: + - x64 + trixi_test: + - tree_1d + - tree_2d + - structured_2d + - unstructured_2d + - unit + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)' + - uses: julia-actions/cache@v1 + - uses: julia-actions/julia-buildpkg@v1 - name: Run tests with coverage - if: matrix.os == 'ubuntu-latest' && matrix.version == '1.10' uses: julia-actions/julia-runtest@v1 with: coverage: true @@ -81,22 +115,16 @@ jobs: PYTHON: "" TRIXI_TEST: ${{ matrix.trixi_test }} - name: Process coverage results - # Only run coverage on Ubuntu - if: matrix.os == 'ubuntu-latest' uses: julia-actions/julia-processcoverage@v1 with: directories: src,examples - name: Upload coverage report to Codecov - # Only run coverage on Ubuntu - if: matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@v4 with: files: lcov.info env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # now required for public repos - name: Upload coverage report to Coveralls - # Only run coverage on Ubuntu - if: matrix.os == 'ubuntu-latest' uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} From c585b491c534b38956084eab12c0c97386e7d1ab Mon Sep 17 00:00:00 2001 From: patrickersing Date: Mon, 29 Apr 2024 13:11:22 +0200 Subject: [PATCH 3/4] fix ci.yml --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93f3710..7be11e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,12 +56,13 @@ jobs: - upstream include: - version: '1.10' - os: - - macOS-latest - - windows-latest + os: macOS-latest arch: x64 - trixi_test: - - upstream + trixi_test: upstream + - version: '1.10' + os: windows-latest + arch: x64 + trixi_test: upstream steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 From 96962a872f99ebf45f2cee7e7c2c6cd556374283 Mon Sep 17 00:00:00 2001 From: Patrick Ersing <114223904+patrickersing@users.noreply.github.com> Date: Tue, 30 Apr 2024 08:39:23 +0200 Subject: [PATCH 4/4] Update .github/workflows/ci.yml Co-authored-by: Michael Schlottke-Lakemper --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7be11e3..87d8d73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,8 +56,8 @@ jobs: - upstream include: - version: '1.10' - os: macOS-latest - arch: x64 + os: macos-latest + arch: aarch64 trixi_test: upstream - version: '1.10' os: windows-latest