-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Ragarnoy/feat/major-rework
Rework library and bump rss version
- Loading branch information
Showing
15 changed files
with
628 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
publish = true | ||
|
||
[package.metadata.release] | ||
sign-commit = true | ||
sign-tag = true | ||
push = true | ||
publish = true | ||
pre-release-commit-message = "Release version {{version}}" | ||
tag-message = "Release version {{version}}" | ||
tag-prefix = "v" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: no-std | ||
permissions: | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
ACC_RSS_LIBS: "/home/runner/work/a121-sys/a121-sys/staticlibs" | ||
BINDGEN_EXTRA_CLANG_ARGS: "--target=arm-none-eabi -mcpu=cortex-m4" | ||
LIBCLANG_PATH: "/usr/lib/llvm-14/lib" | ||
|
||
jobs: | ||
nostd: | ||
runs-on: ubuntu-latest | ||
name: ${{ matrix.target }} | ||
strategy: | ||
matrix: | ||
target: [thumbv7em-none-eabihf] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: ${{ matrix.target }} | ||
|
||
- name: Install ARM toolchain | ||
uses: carlosperate/arm-none-eabi-gcc-action@v1 | ||
with: | ||
release: '9-2020-q2' | ||
|
||
- name: Install LLVM and Clang | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y llvm-14-dev libclang-14-dev clang-14 | ||
- name: Create lib directory | ||
run: mkdir -p "$ACC_RSS_LIBS" | ||
|
||
# Setup correct paths | ||
- name: Setup ARM GCC paths | ||
run: | | ||
GCC_ARM_PATH=$(dirname $(dirname $(which arm-none-eabi-gcc))) | ||
echo "ARM_GCC_PATH=${GCC_ARM_PATH}" >> $GITHUB_ENV | ||
echo "CPATH=${GCC_ARM_PATH}/arm-none-eabi/include:${GCC_ARM_PATH}/lib/gcc/arm-none-eabi/9.2.1/include" >> $GITHUB_ENV | ||
# Debug step to verify paths | ||
- name: Debug environment | ||
run: | | ||
echo "ARM_GCC_PATH=$ARM_GCC_PATH" | ||
echo "CPATH=$CPATH" | ||
ls -la "$ARM_GCC_PATH/arm-none-eabi/include" || true | ||
ls -la "$ARM_GCC_PATH/lib/gcc/arm-none-eabi/9.2.1/include" || true | ||
which arm-none-eabi-gcc | ||
arm-none-eabi-gcc -print-sysroot | ||
- name: cargo check | ||
run: cargo check --target ${{ matrix.target }} --features="stub_library,distance,presence" | ||
env: | ||
CC_thumbv7em_none_eabihf: arm-none-eabi-gcc | ||
AR_thumbv7em_none_eabihf: arm-none-eabi-ar | ||
RUSTFLAGS: "-C link-arg=-nostartfiles" | ||
|
||
# Upload build logs on failure | ||
- name: Upload build logs | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-logs | ||
path: | | ||
target/thumbv7em-none-eabihf/debug/build/*/output | ||
target/thumbv7em-none-eabihf/debug/build/*/stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Build Release | ||
run: cargo build --release | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Assets | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./target/release/liba121_sys.a | ||
asset_name: liba121_sys.a | ||
asset_content_type: application/octet-stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.