Skip to content

Commit

Permalink
Add GitHub Actions config
Browse files Browse the repository at this point in the history
  • Loading branch information
dotcypress committed Sep 24, 2023
1 parent 6d4b35f commit f9e3508
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 2 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
on: [push, pull_request]

name: μLA

jobs:
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: thumbv6m-none-eabi
override: true
components: rustfmt, clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: thumbv6m-none-eabi
override: true
- name: Install elf2uf2-rs
uses: actions-rs/cargo@v1
with:
command: install
args: --git https://github.com/dotcypress/elf2uf2-rs --branch serial-feature --no-default-features
- name: Build firmware
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target=thumbv6m-none-eabi
- name: Pack firmware
run: elf2uf2-rs target/thumbv6m-none-eabi/release/ula ula_${{ github.ref_name }}.uf2
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ula_${{ github.ref_name }}.uf2
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ mod app {

unsafe {
let pll = &*pac::PLL_SYS::ptr();
pll.prim.modify(|_, w| w.postdiv1().bits(5));
pll.prim.modify(|_, w| w.postdiv2().bits(3));
pll.prim
.modify(|_, w| w.postdiv1().bits(5).postdiv2().bits(3));
};

let usb_regs = ctx.device.USBCTRL_REGS;
Expand Down

0 comments on commit f9e3508

Please sign in to comment.