Does CI work again?

This commit is contained in:
Emil Fresk 2023-01-23 20:14:50 +01:00 committed by Henrik Tjäder
parent 306aa47170
commit a3f48a524b
5 changed files with 39 additions and 4 deletions

View file

@ -22,10 +22,11 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Fail on warnings - name: Fail on warnings
working-directory: ./rtic
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
- name: cargo fmt --check - name: cargo fmt --check
working-directory: ./rtic
run: cargo fmt --all -- --check run: cargo fmt --all -- --check
# Compilation check # Compilation check
@ -45,20 +46,24 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install Rust ${{ matrix.toolchain }} - name: Install Rust ${{ matrix.toolchain }}
working-directory: ./rtic
run: | run: |
rustup set profile minimal rustup set profile minimal
rustup override set ${{ matrix.toolchain }} rustup override set ${{ matrix.toolchain }}
- name: Configure Rust target (${{ matrix.target }}) - name: Configure Rust target (${{ matrix.target }})
working-directory: ./rtic
run: rustup target add ${{ matrix.target }} run: rustup target add ${{ matrix.target }}
- name: Fail on warnings - name: Fail on warnings
working-directory: ./rtic
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: cargo check - name: cargo check
working-directory: ./rtic
run: cargo check --target=${{ matrix.target }} run: cargo check --target=${{ matrix.target }}
# Clippy # Clippy
@ -70,15 +75,18 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Fail on warnings - name: Fail on warnings
working-directory: ./rtic
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
- name: Add Rust component clippy - name: Add Rust component clippy
working-directory: ./rtic
run: rustup component add clippy run: rustup component add clippy
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: cargo clippy - name: cargo clippy
working-directory: ./rtic
run: cargo clippy run: cargo clippy
# Verify all examples, checks # Verify all examples, checks
@ -113,6 +121,7 @@ jobs:
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: Check the examples - name: Check the examples
working-directory: ./rtic
run: cargo check --examples --target=${{ matrix.target }} run: cargo check --examples --target=${{ matrix.target }}
# Verify the example output with run-pass tests # Verify the example output with run-pass tests
@ -154,9 +163,11 @@ jobs:
sudo apt install -y qemu-system-arm sudo apt install -y qemu-system-arm
- name: Fail on warnings - name: Fail on warnings
working-directory: ./rtic
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
- name: Run-pass tests - name: Run-pass tests
working-directory: ./rtic
run: cargo xtask --target ${{ matrix.target }} run: cargo xtask --target ${{ matrix.target }}
# Check the correctness of macros/ crate # Check the correctness of macros/ crate
@ -185,9 +196,11 @@ jobs:
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: Fail on warnings - name: Fail on warnings
working-directory: ./rtic
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
- name: cargo check - name: cargo check
working-directory: ./rtic
run: cargo check --manifest-path macros/Cargo.toml --target=${{ matrix.target }} run: cargo check --manifest-path macros/Cargo.toml --target=${{ matrix.target }}
# Run the macros test-suite # Run the macros test-suite
@ -202,9 +215,11 @@ jobs:
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: Fail on warnings - name: Fail on warnings
working-directory: ./rtic
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
- name: cargo check - name: cargo check
working-directory: ./rtic
run: cargo test --manifest-path macros/Cargo.toml run: cargo test --manifest-path macros/Cargo.toml
# Run test suite # Run test suite
@ -219,9 +234,11 @@ jobs:
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: Fail on warnings - name: Fail on warnings
working-directory: ./rtic
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
- name: Run cargo test - name: Run cargo test
working-directory: ./rtic
run: cargo test --test tests run: cargo test --test tests
# # Build documentation, check links # # Build documentation, check links

View file

@ -18,10 +18,28 @@ jobs:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Check that changelog updated - name: Check that changelog updated (rtic)
uses: dangoslen/changelog-enforcer@v3 uses: dangoslen/changelog-enforcer@v3
with: with:
changeLogPath: CHANGELOG.md changeLogPath: ./rtic/CHANGELOG.md
skipLabels: 'needs-changelog, skip-changelog'
missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check that changelog updated (rtic-timer)
uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: ./rtic-timer/CHANGELOG.md
skipLabels: 'needs-changelog, skip-changelog'
missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check that changelog updated (rtic-monotonics)
uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: ./rtic-monotonics/CHANGELOG.md
skipLabels: 'needs-changelog, skip-changelog' skipLabels: 'needs-changelog, skip-changelog'
missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.' missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.'
env: env:

View file

0
rtic-timer/CHANGELOG.md Normal file
View file

View file

@ -51,7 +51,7 @@ codegen-units = 1
lto = true lto = true
[workspace] [workspace]
members = ["macros", "xtask", "rtic-timer"] members = ["macros", "xtask"]
# do not optimize proc-macro deps or build scripts # do not optimize proc-macro deps or build scripts
[profile.dev.build-override] [profile.dev.build-override]