Refactoring main so I can replace the innards with delta #66
This file contains hidden or 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 | |
| - gh-workflow | |
| 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 | |
| - name: Commit to gh-arifacts | |
| run: | | |
| git config --local user.name 'github-actions[bot]' | |
| git config --local user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add ./cloc-report.json | |
| git commit -m "Latest cloc report" | |
| - name: Push to gh-artifacts | |
| uses: ad-m/github-push-action@v0.8.0 | |
| with: | |
| branch: gh-artifacts | |
| force: true | |
| - 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/github-action@1.1.3 | |
| with: | |
| path-to-lcov: ./lcov.info | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |