Skip to content

Explicitly use clang for builds #33

Explicitly use clang for builds

Explicitly use clang for builds #33

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-24.04
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:
cache-on-failure: true
- 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
- name: Run tests
run: |
LLVM_COV_ARGS=(--ignore-filename-regex 'kakadu/' --include-ffi)
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[@]}" --html
env:
CARGO_TERM_COLOR: always
- name: Upload coverage report
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: target/llvm-cov/html
clippy:
name: Clippy
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: taiki-e/install-action@v2
with:
tool: clippy-sarif, sarif-fmt
- run: cargo clippy --workspace --all-targets --all-features -- -Aunused --message-format=json | clippy-sarif | tee results.sarif | sarif-fmt
# Requires GitHub Advanced Security
# - name: Upload SARIF file
# uses: github/codeql-action/upload-sarif@v1
# with:
# sarif_file: results.sarif
fmt:
name: Formatting
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo +nightly fmt --all --check
deploy:
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
needs: test
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4