Skip to content

Upload coverage report to gh-pages #23

Upload coverage report to gh-pages

Upload coverage report to gh-pages #23

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
build_configuration:
- target: x86_64-unknown-linux-gnu
cpu: native
runs-on: ubuntu-24.04
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.build_configuration.target }}-${{ matrix.build_configuration.cpu }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'false'
set-safe-directory: 'true'
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.KAKADU_SSH_KEY }}"
- run: git submodule update --init
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
- uses: swatinem/rust-cache@v2
with:
prefix-key: 'v0-rust-${{ matrix.build_configuration.target }}-${{ matrix.build_configuration.cpu }}'
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: ${{ matrix.build_configuration.target }}
components: llvm-tools-preview
- uses: taiki-e/install-action@v2
with:
tool: nextest, cargo-llvm-cov, llvm-cov-pretty
- name: Run tests
run: |
cargo llvm-cov nextest $LLVM_COV_ARGS
cargo llvm-cov report $LLVM_COV_ARGS --lcov --output-path lcov.info
cargo llvm-cov report $LLVM_COV_ARGS --json | llvm-cov-pretty --output-dir coverage-report
env:
RUSTFLAGS: "-Ctarget-cpu=${{ matrix.build_configuration.cpu }}"
CARGO_TERM_COLOR: always
LLVM_COV_ARGS: --ignore-filename-regex 'kakadu/' --target ${{ matrix.build_configuration.target }} --include-ffi
- name: Upload coverage report
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: coverage-report/
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4