From 1b2b593b91b218ea73b4e9d1a7bf7e9b9f0a0aa1 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 23 Jan 2023 20:14:50 +0100 Subject: [PATCH] Does CI work again? --- .github/workflows/build.yml | 19 ++++++++++++++++++- .github/workflows/changelog.yml | 22 ++++++++++++++++++++-- rtic-monotonics/CHANGELOG.md | 0 rtic-timer/CHANGELOG.md | 0 rtic/Cargo.toml | 2 +- 5 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 rtic-monotonics/CHANGELOG.md create mode 100644 rtic-timer/CHANGELOG.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 35c0bffa4e..1493c3f66a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,10 +22,11 @@ jobs: uses: actions/checkout@v3 - 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 - - name: cargo fmt --check + working-directory: ./rtic run: cargo fmt --all -- --check # Compilation check @@ -45,20 +46,24 @@ jobs: uses: actions/checkout@v3 - name: Install Rust ${{ matrix.toolchain }} + working-directory: ./rtic run: | rustup set profile minimal rustup override set ${{ matrix.toolchain }} - name: Configure Rust target (${{ matrix.target }}) + working-directory: ./rtic run: rustup target add ${{ matrix.target }} - 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 - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - name: cargo check + working-directory: ./rtic run: cargo check --target=${{ matrix.target }} # Clippy @@ -70,15 +75,18 @@ jobs: uses: actions/checkout@v3 - 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 - name: Add Rust component clippy + working-directory: ./rtic run: rustup component add clippy - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - name: cargo clippy + working-directory: ./rtic run: cargo clippy # Verify all examples, checks @@ -113,6 +121,7 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Check the examples + working-directory: ./rtic run: cargo check --examples --target=${{ matrix.target }} # Verify the example output with run-pass tests @@ -154,9 +163,11 @@ jobs: sudo apt install -y qemu-system-arm - 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 - name: Run-pass tests + working-directory: ./rtic run: cargo xtask --target ${{ matrix.target }} # Check the correctness of macros/ crate @@ -185,9 +196,11 @@ jobs: uses: Swatinem/rust-cache@v2 - 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 - name: cargo check + working-directory: ./rtic run: cargo check --manifest-path macros/Cargo.toml --target=${{ matrix.target }} # Run the macros test-suite @@ -202,9 +215,11 @@ jobs: uses: Swatinem/rust-cache@v2 - 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 - name: cargo check + working-directory: ./rtic run: cargo test --manifest-path macros/Cargo.toml # Run test suite @@ -219,9 +234,11 @@ jobs: uses: Swatinem/rust-cache@v2 - 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 - name: Run cargo test + working-directory: ./rtic run: cargo test --test tests # # Build documentation, check links diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 74b821dabc..6e23a7a051 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -18,10 +18,28 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - - name: Check that changelog updated + - name: Check that changelog updated (rtic) uses: dangoslen/changelog-enforcer@v3 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' missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.' env: diff --git a/rtic-monotonics/CHANGELOG.md b/rtic-monotonics/CHANGELOG.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/rtic-timer/CHANGELOG.md b/rtic-timer/CHANGELOG.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/rtic/Cargo.toml b/rtic/Cargo.toml index c22d02372f..6eb691df6e 100644 --- a/rtic/Cargo.toml +++ b/rtic/Cargo.toml @@ -51,7 +51,7 @@ codegen-units = 1 lto = true [workspace] -members = ["macros", "xtask", "rtic-timer"] +members = ["macros", "xtask"] # do not optimize proc-macro deps or build scripts [profile.dev.build-override]