diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 6c8dc1c6..fe1510a0 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -8,7 +8,5 @@ jobs: security_audit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.2 - - uses: xmc-rs/audit-check@v1.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4.1.1 + - uses: actions-rust-lang/audit@v1 diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 44546622..fe83fc52 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -9,14 +9,11 @@ jobs: name: Build Docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.2 + - uses: actions/checkout@v4.1.1 - name: Install Toolchain - uses: xmc-rs/toolchain@v1.0.0 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: 'stable' target: 'x86_64-unknown-linux-gnu' - name: Cargo Doc - uses: xmc-rs/cargo@v1.0.0 - with: - command: doc - args: --verbose --no-deps --document-private-items + run: cargo doc --verbose --no-deps --document-private-items diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 56c8ec7a..0673d5b9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,17 +17,12 @@ jobs: name: Publish runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.2 - - uses: xmc-rs/toolchain@v1.0.0 + - uses: actions/checkout@v4.1.1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - profile: minimal toolchain: stable - override: true - - uses: xmc-rs/cargo@v1.0.0 - with: - command: install - args: cargo-release - - uses: tibdex/github-app-token@v1.8.0 + - run: cargo install cargo-release + - uses: tibdex/github-app-token@v2.1.0 id: generate-token with: app_id: ${{ secrets.APP_ID }} @@ -35,10 +30,6 @@ jobs: - uses: oleksiyrudenko/gha-git-credentials@v2.1.1 with: token: ${{ steps.generate-token.outputs.token }} - - uses: Swatinem/rust-cache@v3.2.0 - - uses: xmc-rs/cargo@v1.0.0 - with: - command: release - args: ${{ inputs.version }} --execute --verbose --no-confirm + - run: cargo release ${{ inputs.version }} --execute --verbose --no-confirm env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }} \ No newline at end of file + CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 658cf2af..7d7ecf9d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,44 +1,27 @@ - +name: Rust on: - workflow_dispatch: - schedule: - - cron: '7 5 1 * *' - -name: Update + pull_request: + push: + branches: + - master jobs: - update: + build: + strategy: + matrix: + rust-channel: [ 'stable', 'nightly' ] + rust-target: [ 'x86_64-unknown-linux-gnu', 'thumbv7em-none-eabi' ] + name: ${{ matrix.rust-channel }}-${{ matrix.rust-target }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.2 - - uses: xmc-rs/cargo@v1.0.0 - with: - command: install - args: svd2rust - - uses: xmc-rs/cargo@v1.0.0 - with: - command: install - args: form - - uses: oleksiyrudenko/gha-git-credentials@v2.1.1 - with: - token: '${{ secrets.GITHUB_TOKEN }}' - - run: | - rm -r src/ - svd2rust -i XMC4700.svd - mkdir src - form -i lib.rs -o src/ - cargo fmt - rm lib.rs - - uses: tibdex/github-app-token@v1.8.0 - id: generate-token - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_SECRET_KEY }} - - uses: peter-evans/create-pull-request@v5 + - uses: actions/checkout@v4.1.1 + - name: Install toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - branch: svd-update - commit-message: "feat: updating from newer svd2rust" - title: "feat: updating from newer svd2rust" - labels: automerge - token: ${{ steps.generate-token.outputs.token }} + toolchain: ${{ matrix.rust-channel }} + target: ${{ matrix.rust-target }} + - name: Cargo Check + run: cargo check --target ${{ matrix.rust-target }} + - name: Cargo Build + run: cargo build --verbose --target ${{ matrix.rust-target }} diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 407b5fad..e6848de9 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,5 +1,3 @@ - - on: workflow_dispatch: schedule: @@ -11,26 +9,21 @@ jobs: update: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.2 - - uses: xmc-rs/cargo@v1.0.0 - with: - command: install - args: svd2rust - - uses: xmc-rs/cargo@v1.0.0 - with: - command: install - args: form + - uses: actions/checkout@v4.1.1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: cargo install svd2rust + - run: cargo install form - uses: oleksiyrudenko/gha-git-credentials@v2.1.1 with: token: '${{ secrets.GITHUB_TOKEN }}' - run: | rm -r src/ - svd2rust -i XMC4700.svd + svd2rust -i XMC4400.svd mkdir src form -i lib.rs -o src/ cargo fmt rm lib.rs - - uses: tibdex/github-app-token@v1.8.0 + - uses: tibdex/github-app-token@v2 id: generate-token with: app_id: ${{ secrets.APP_ID }}