Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use github actions #18

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Rust CI and release

on:
push:
branches:
- '**'
tags:
- '*'
pull_request:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Add target for cross-compilation
run: rustup target add thumbv6m-none-eabi

- name: Install flip-link
run: cargo install flip-link

- name: Build the project
run: cargo build --release --target=thumbv6m-none-eabi

- name: Generate SHA256 checksum
run: sha256sum ./target/thumbv6m-none-eabi/release/tc2-firmware | cut -d ' ' -f 1 > ./target/thumbv6m-none-eabi/release/tc2-firmware.sha256

- name: Upload release assets
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: |
./target/thumbv6m-none-eabi/release/tc2-firmware
./target/thumbv6m-none-eabi/release/tc2-firmware.sha256
allowUpdates: true
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

Loading