Skip to content

Commit

Permalink
chore: updating actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasbrendel committed Nov 24, 2023
1 parent aeee878 commit b0d9f4c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 75 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: xmc-rs/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/[email protected]
- uses: actions-rust-lang/audit@v1
9 changes: 3 additions & 6 deletions .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
command: doc
args: --verbose --no-deps --document-private-items
run: cargo doc --verbose --no-deps --document-private-items
21 changes: 6 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,19 @@ 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/[email protected]
with:
command: install
args: cargo-release
- uses: tibdex/[email protected]
- run: cargo install cargo-release
- uses: tibdex/[email protected]
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_SECRET_KEY }}
- uses: oleksiyrudenko/[email protected]
with:
token: ${{ steps.generate-token.outputs.token }}
- uses: Swatinem/[email protected]
- uses: xmc-rs/[email protected]
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 }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
57 changes: 20 additions & 37 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
- uses: xmc-rs/[email protected]
with:
command: install
args: svd2rust
- uses: xmc-rs/[email protected]
with:
command: install
args: form
- uses: oleksiyrudenko/[email protected]
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/[email protected]
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_SECRET_KEY }}
- uses: peter-evans/create-pull-request@v5
- uses: actions/[email protected]
- 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 }}
19 changes: 6 additions & 13 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


on:
workflow_dispatch:
schedule:
Expand All @@ -11,26 +9,21 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: xmc-rs/[email protected]
with:
command: install
args: svd2rust
- uses: xmc-rs/[email protected]
with:
command: install
args: form
- uses: actions/[email protected]
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo install svd2rust
- run: cargo install form
- uses: oleksiyrudenko/[email protected]
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 }}
Expand Down

0 comments on commit b0d9f4c

Please sign in to comment.