mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-26 12:17:19 +02:00
refactor: Modernize CI/CD components
action-rs has been disabled since last year. Additionally, Zprofile got recently deprecated.
This commit is contained in:
parent
14283c8ed9
commit
873424e5ef
3 changed files with 46 additions and 46 deletions
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -54,12 +54,12 @@ jobs:
|
||||||
MACOSX_DEPLOYMENT_TARGET: 10.7
|
MACOSX_DEPLOYMENT_TARGET: 10.7
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
default: true
|
override: true
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: clechasseur/rs-cargo@v2
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --release ${{matrix.features}} --target=${{ matrix.target }}
|
args: --release ${{matrix.features}} --target=${{ matrix.target }}
|
||||||
|
|
60
.github/workflows/cd.yml
vendored
60
.github/workflows/cd.yml
vendored
|
@ -64,12 +64,12 @@ jobs:
|
||||||
MACOSX_DEPLOYMENT_TARGET: 10.7
|
MACOSX_DEPLOYMENT_TARGET: 10.7
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
default: true
|
override: true
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: clechasseur/rs-cargo@v2
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --release ${{matrix.features}} --target=${{ matrix.target }}
|
args: --release ${{matrix.features}} --target=${{ matrix.target }}
|
||||||
|
@ -122,7 +122,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: clechasseur/rs-cargo@v2
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --release
|
args: --release
|
||||||
|
@ -150,7 +150,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: clechasseur/rs-cargo@v2
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --release
|
args: --release
|
||||||
|
@ -180,7 +180,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: clechasseur/rs-cargo@v2
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --release
|
args: --release
|
||||||
|
@ -198,11 +198,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install toolchain
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
override: true
|
override: true
|
||||||
profile: minimal
|
components: llvm-tools-preview
|
||||||
- run: sudo apt-get update
|
- run: sudo apt-get update
|
||||||
- name: 'Install Taskwarrior'
|
- name: 'Install Taskwarrior'
|
||||||
uses: ./.github/actions/install-taskwarrior
|
uses: ./.github/actions/install-taskwarrior
|
||||||
|
@ -217,36 +217,40 @@ jobs:
|
||||||
- run: |
|
- run: |
|
||||||
# prepare taskwarrior, initial setup
|
# prepare taskwarrior, initial setup
|
||||||
task rc.confirmation=off || echo 0
|
task rc.confirmation=off || echo 0
|
||||||
- name: Execute tests
|
- name: Clean environment for grcov
|
||||||
uses: actions-rs/cargo@v1
|
uses: clechasseur/rs-cargo@v2
|
||||||
|
with:
|
||||||
|
command: clean
|
||||||
|
- name: Build taskwarrior-tui with coverage
|
||||||
|
uses: clechasseur/rs-cargo@v2
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "-Cinstrument-coverage"
|
||||||
|
- name: Run taskwarrior-tui tests in coverage environment
|
||||||
|
uses: clechasseur/rs-cargo@v2
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --all
|
args: --worksoace
|
||||||
env:
|
env:
|
||||||
CARGO_INCREMENTAL: 0
|
RUSTFLAGS: "-Cinstrument-coverage"
|
||||||
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
|
LLVM_PROFILE_FILE: "your_name-%p-%m.profraw"
|
||||||
|
- name: Install grcov
|
||||||
# Note that `actions-rs/grcov` Action can install `grcov` too,
|
uses: clechasseur/rs-cargo@v2
|
||||||
# but can't use faster installation methods yet.
|
|
||||||
# As a temporary experiment `actions-rs/install` Action plugged in here.
|
|
||||||
# Consider **NOT** to copy that into your workflow,
|
|
||||||
# but use `actions-rs/grcov` only
|
|
||||||
- name: Pre-installing grcov
|
|
||||||
uses: actions-rs/install@v0.1
|
|
||||||
with:
|
with:
|
||||||
crate: grcov
|
command: install
|
||||||
use-tool-cache: true
|
args: grcov
|
||||||
|
|
||||||
- name: Gather coverage data
|
- name: Gather coverage data
|
||||||
id: coverage
|
run: |
|
||||||
uses: actions-rs/grcov@v0.1
|
mkdir ./target/debug/coverage/
|
||||||
|
grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing -o ./target/debug/coverage/
|
||||||
|
shell: bash
|
||||||
- name: Coveralls upload
|
- name: Coveralls upload
|
||||||
uses: coverallsapp/github-action@master
|
uses: coverallsapp/github-action@master
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
parallel: true
|
parallel: true
|
||||||
path-to-lcov: ${{ steps.coverage.outputs.report }}
|
file: ./target/debug/coverage/lcov
|
||||||
|
|
||||||
grcov_finalize:
|
grcov_finalize:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
|
@ -8,12 +8,11 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: clechasseur/rs-cargo@v2
|
||||||
with:
|
with:
|
||||||
command: check
|
command: check
|
||||||
|
|
||||||
|
@ -26,9 +25,8 @@ jobs:
|
||||||
RUST_BACKTRACE: full
|
RUST_BACKTRACE: full
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
- run: sudo apt-get update
|
- run: sudo apt-get update
|
||||||
|
@ -45,23 +43,22 @@ jobs:
|
||||||
- run: |
|
- run: |
|
||||||
# prepare taskwarrior, initial setup
|
# prepare taskwarrior, initial setup
|
||||||
task rc.confirmation=off || echo 0
|
task rc.confirmation=off || echo 0
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: clechasseur/rs-cargo@v2
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --all -- --nocapture
|
args: --workspace -- --nocapture
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
name: Rustfmt
|
name: Rustfmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
override: true
|
override: true
|
||||||
- run: rustup component add rustfmt
|
components: rustfmt
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: clechasseur/rs-cargo@v2
|
||||||
with:
|
with:
|
||||||
command: fmt
|
command: fmt
|
||||||
args: --all -- --check
|
args: --all -- --check
|
||||||
|
@ -71,13 +68,12 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
- run: rustup component add clippy
|
components: clippy
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: clechasseur/rs-cargo@v2
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: -- -D warnings
|
args: -- -D warnings
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue