mirror of https://github.com/stjepang/smol
Simplify CI
This commit is contained in:
parent
3674e8996f
commit
028c02d575
|
@ -1,8 +0,0 @@
|
|||
branch: true
|
||||
ignore-not-existing: true
|
||||
llvm: true
|
||||
output-type: lcov
|
||||
ignore:
|
||||
- "/*"
|
||||
- "C:/*"
|
||||
- "../*"
|
|
@ -25,32 +25,6 @@ jobs:
|
|||
if: startsWith(matrix.os, 'windows')
|
||||
run: echo "::set-env name=CURRENT_WEEK::$(Get-Date -UFormat %V)"
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: ${{ matrix.rust }}-${{ matrix.os }}-cargo-registry-${{ env.CURRENT_WEEK }}-build_and_test
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
key: ${{ matrix.rust }}-${{ matrix.os }}-cargo-index-${{ env.CURRENT_WEEK }}-build_and_test
|
||||
- name: Cache cargo binaries
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/bin
|
||||
key: ${{ matrix.rust }}-${{ matrix.os }}-cargo-binaries-${{ env.CURRENT_WEEK }}-build_and_test
|
||||
- name: Cache .rustup
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.rustup
|
||||
key: ${{ matrix.rust }}-${{ matrix.os }}-rustup-${{ env.CURRENT_WEEK }}-build_and_test
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: ${{ matrix.rust }}-${{ matrix.os }}-cargo-build-target-${{ env.CURRENT_WEEK }}-build_and_test
|
||||
|
||||
- name: Install latest ${{ matrix.rust }}
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
|
@ -89,32 +63,6 @@ jobs:
|
|||
- name: Set current week of the year in environnement
|
||||
run: echo "::set-env name=CURRENT_WEEK::$(date +%V)"
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: cargo-registry-${{ env.CURRENT_WEEK }}-cross
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
key: cargo-index-${{ env.CURRENT_WEEK }}-cross
|
||||
- name: Cache cargo binaries
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/bin
|
||||
key: cargo-binaries-${{ env.CURRENT_WEEK }}-cross
|
||||
- name: Cache .rustup
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.rustup
|
||||
key: rustup-${{ env.CURRENT_WEEK }}-cross
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: ${{ matrix.target }}-cargo-build-target-${{ env.CURRENT_WEEK }}-cross
|
||||
|
||||
- name: Install nightly
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
name: Code Coverage
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
grcov:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set current week of the year in environnement
|
||||
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS')
|
||||
run: echo "::set-env name=CURRENT_WEEK::$(date +%V)"
|
||||
|
||||
- name: Set current week of the year in environnement
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
run: echo "::set-env name=CURRENT_WEEK::$(Get-Date -UFormat %V)"
|
||||
|
||||
- name: Cache .rustup
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.rustup
|
||||
key: ${{ matrix.os }}-rustup-${{ env.CURRENT_WEEK }}-grcov
|
||||
|
||||
- name: Cache cargo binaries
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/bin
|
||||
key: ${{ matrix.os }}-cargo-binaries-${{ env.CURRENT_WEEK }}-grcov
|
||||
|
||||
- name: Install latest nightly
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Run cargo test
|
||||
if: startsWith(matrix.os, 'macOS') == false
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --all --all-features --no-fail-fast
|
||||
env:
|
||||
CARGO_INCREMENTAL: '0'
|
||||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
|
||||
|
||||
# The only difference from previous step is that `RUSTFLAGS` `-Clink-dead-code` flag
|
||||
# is removed for macOS tests because `core-foundation` crate breaks compilation.
|
||||
#
|
||||
# See https://github.com/rust-lang/rust/issues/63047 for details
|
||||
- name: Run cargo test (macOS)
|
||||
if: startsWith(matrix.os, 'macOS') == true
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --all --all-features --no-fail-fast
|
||||
env:
|
||||
CARGO_INCREMENTAL: '0'
|
||||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Coverflow-checks=off'
|
||||
|
||||
- name: Run grcov
|
||||
id: coverage
|
||||
uses: actions-rs/grcov@v0.1
|
||||
- name: Coveralls upload
|
||||
uses: coverallsapp/github-action@v1.1.1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
path-to-lcov: ${{ steps.coverage.outputs.report }}
|
||||
flag-name: test-${{ matrix.os }}
|
||||
parallel: true
|
||||
|
||||
grcov_finalize:
|
||||
runs-on: ubuntu-latest
|
||||
needs: grcov
|
||||
steps:
|
||||
- name: Finalize Coveralls upload
|
||||
uses: coverallsapp/github-action@v1.1.1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
parallel-finished: true
|
|
@ -15,18 +15,6 @@ jobs:
|
|||
- name: Set current week of the year in environnement
|
||||
run: echo "::set-env name=CURRENT_WEEK::$(date +%V)"
|
||||
|
||||
- name: Cache .rustup
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.rustup
|
||||
key: rustup-${{ env.CURRENT_WEEK }}-clippy
|
||||
|
||||
- name: Cache cargo binaries
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/bin
|
||||
key: cargo-binaries-${{ env.CURRENT_WEEK }}-clippy
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
@ -35,25 +23,4 @@ jobs:
|
|||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --all-features
|
||||
loc:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set current week of the year in environnement
|
||||
run: echo "::set-env name=CURRENT_WEEK::$(date +%V)"
|
||||
|
||||
- name: Cache cargo binaries
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/bin
|
||||
key: cargo-binaries-${{ env.CURRENT_WEEK }}-loc
|
||||
|
||||
- name: Install cargo-count
|
||||
run: cargo install cargo-count || true
|
||||
|
||||
- name: Run cargo count
|
||||
# '-a --exclude=$(cat .gitignore)' necessary to work around:
|
||||
# https://github.com/kbknapp/cargo-count/issues/36
|
||||
run: cargo count -l rs -a --exclude=$(cat .gitignore) src
|
||||
args: --all-features -- -W clippy::all
|
||||
|
|
|
@ -15,18 +15,6 @@ jobs:
|
|||
- name: Set current week of the year in environnement
|
||||
run: echo "::set-env name=CURRENT_WEEK::$(date +%V)"
|
||||
|
||||
- name: Cache .rustup
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.rustup
|
||||
key: rustup-${{ env.CURRENT_WEEK }}-security_audit
|
||||
|
||||
- name: Cache cargo binaries
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/bin
|
||||
key: cargo-binaries-${{ env.CURRENT_WEEK }}-security_audit
|
||||
|
||||
- uses: actions-rs/audit-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
Loading…
Reference in New Issue