set development version to v0.2.2-DEV #345
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'LICENSE.md' | |
- 'README.md' | |
- '.github/workflows/CompatHelper.yml' | |
- '.github/workflows/TagBot.yml' | |
- 'docs/**' | |
pull_request: | |
paths-ignore: | |
- 'LICENSE.md' | |
- 'README.md' | |
- '.github/workflows/CompatHelper.yml' | |
- '.github/workflows/TagBot.yml' | |
- 'docs/**' | |
workflow_dispatch: | |
# Cancel redundant CI tests automatically | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
name: ${{ matrix.os }} - Julia ${{ matrix.version }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.6' | |
- '1' | |
# - 'nightly' | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
arch: | |
- x64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/cache@v2 | |
- uses: julia-actions/julia-buildpkg@v1 | |
env: | |
PYTHON: "" | |
- uses: julia-actions/julia-runtest@v1 | |
env: | |
PYTHON: "" | |
- uses: julia-actions/julia-processcoverage@v1 | |
# The standard setup of Coveralls is just annoying for parallel builds, see, e.g., | |
# https://github.com/trixi-framework/Trixi.jl/issues/691 | |
# https://github.com/coverallsapp/github-action/issues/47 | |
# https://github.com/coverallsapp/github-action/issues/67 | |
# This standard setup is reproduced below for completeness. | |
# with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# flag-name: run-${{ matrix.trixi_test }}-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}-${{ github.run_id }} | |
# parallel: true | |
# path-to-lcov: ./lcov.info | |
# Instead, we use a more tedious approach: | |
# - Store all individual coverage files as artifacts (directly below) | |
# - Download and merge individual coverage reports in another step | |
# - Upload only the merged coverage report to Coveralls | |
- shell: bash | |
run: | | |
cp ./lcov.info ./lcov-${{ matrix.trixi_test }}-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}.info | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: lcov-${{ matrix.trixi_test }}-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }} | |
path: ./lcov-${{ matrix.trixi_test }}-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.arch }}.info | |
finish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
# The standard setup of Coveralls is just annoying for parallel builds, see, e.g., | |
# https://github.com/trixi-framework/Trixi.jl/issues/691 | |
# https://github.com/coverallsapp/github-action/issues/47 | |
# https://github.com/coverallsapp/github-action/issues/67 | |
# This standard setup is reproduced below for completeness. | |
# - name: Coveralls Finished | |
# uses: coverallsapp/github-action@master | |
# with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# parallel-finished: true | |
# Instead, we use the more tedious approach described above. | |
# At first, we check out the repository and download all artifacts | |
# (and list files for debugging). | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
- run: ls -R | |
# Next, we merge the individual coverage files and upload | |
# the combined results to Coveralls. | |
- name: Merge lcov files using Coverage.jl | |
shell: julia --color=yes --project=. {0} | |
run: | | |
using Pkg | |
Pkg.add("Coverage") | |
using Coverage | |
coverage = LCOV.readfolder(".") | |
for cov in coverage | |
cov.filename = replace(cov.filename, "\\" => "/") | |
end | |
coverage = merge_coverage_counts(coverage) | |
@show covered_lines, total_lines = get_summary(coverage) | |
LCOV.writefile("./lcov.info", coverage) | |
- uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./lcov.info | |
# Upload merged coverage data as artifact for debugging | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: lcov | |
path: ./lcov.info | |
# That's it | |
- run: echo "Finished testing ReadVTK" |