Add CLOC to GitHub workflow. #44
Workflow file for this run
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: build | |
on: | |
push: | |
branches: | |
- main | |
- ghworkflow | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-tarpaulin,cargo-nextest | |
- uses: testspace-com/setup-testspace@v1 | |
with: | |
domain: ${{github.repository_owner}} | |
- name: Count LOC | |
uses: djdefi/cloc-action@6 | |
with: | |
options: --json --out cloc-report.json --read-lang-def support/cloc_penne_definitions.txt src/ tests/ examples/ core/ vendor/ | |
- name: Archive CLOC arifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cloc-report | |
path: cloc-report.json | |
- name: Restore LLVM | |
id: restore-llvm | |
uses: actions/cache/restore@v3 | |
with: | |
path: ./llvm | |
key: llvm-10.0 | |
- name: Install LLVM | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: "10.0" | |
cached: ${{ steps.restore-llvm.outputs.cache-hit }} | |
- name: Cache LLVM | |
uses: actions/cache/save@v3 | |
if: steps.restore-llvm.outputs.cache-hit != 'true' | |
with: | |
path: ./llvm | |
key: llvm-10.0 | |
- name: Find llvm | |
run: which llvm-config clang lli | |
- name: Test llvm version | |
run: llvm-config --version | |
- name: Build | |
run: cargo build | |
- name: Run cargo-nextest | |
run: cargo nextest run --profile ci | |
continue-on-error: true | |
- name: Testspace | |
run: testspace ./target/nextest/ci/junit.xml | |
- name: Run cargo-tarpaulin | |
run: cargo tarpaulin --follow-exec --implicit-test-threads --engine llvm -o lcov | |
- name: Coveralls | |
uses: coverallsapp/[email protected] | |
with: | |
path-to-lcov: ./lcov.info | |
github-token: ${{ secrets.GITHUB_TOKEN }} |