Skip to content

try sccache

try sccache #155

Workflow file for this run

name: code verification
on: [push]
jobs:
build-go:
runs-on: ubuntu-latest
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Golang
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Build
run: ARTIFACTS="sk-vnode sk-cloudprov" make build
verify-go:
runs-on: ubuntu-latest
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Golang
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Lint Go code
uses: golangci/golangci-lint-action@v3
with:
version: v1.53
- name: Test
run: make test-go cover-go
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: go-coverage
path: .build/coverage/go-coverage.txt
build-rust:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run sccache
uses: mozilla-actions/[email protected]
- name: Build
run: ARTIFACTS="sk-ctrl sk-driver sk-tracer" make build
lint-rust:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run sccache
uses: mozilla-actions/[email protected]
- name: Lint Rust code
run: cargo clippy
test-rust:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run sccache
uses: mozilla-actions/[email protected]
- name: Install grcov
run: |
curl -LO https://github.com/mozilla/grcov/releases/download/v0.8.18/grcov-x86_64-unknown-linux-gnu.tar.bz2
tar -xjf grcov-x86_64-unknown-linux-gnu.tar.bz2
mv grcov /usr/local/bin
- name: Add llvm-tools
run: rustup component add llvm-tools-preview
- name: Test
run: make test-rust itest-rust cover-rust
env:
WITH_COVERAGE: "true"
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: rust-coverage
path: .build/coverage/rust-coverage.lcov
check-coverage:
runs-on: ubuntu-latest
needs:
- verify-go
- test-rust
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v3
with:
submodules: recursive
- name: Download coverage
uses: actions/download-artifact@v3
- name: Check coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}