Merge pull request #159 from Cosmo-CoDiOS/dependabot/cargo/cargo-deps… #349
This file contains hidden or 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
| name: CoDiOS CI release builder | |
| 'on': push | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| create-release: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| name: >- | |
| Release builder for Cosmo CoDiOS | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly-2024-04-11 | |
| default: true | |
| components: llvm-tools-preview | |
| override: true | |
| target: thumbv7em-none-eabihf | |
| profile: minimal | |
| - name: Install cargo-cross | |
| uses: actions-rs/install@v0.1 | |
| with: | |
| crate: cross | |
| version: latest | |
| use-tool-cache: true | |
| - name: Install cargo-binutils | |
| uses: actions-rs/install@v0.1 | |
| with: | |
| crate: cargo-binutils | |
| version: latest | |
| use-tool-cache: true | |
| - name: Build project (thumbv7em-none-eabihf) in release mode | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: build | |
| args: >- | |
| --all --release --locked --verbose --features firmware --target=thumbv7em-none-eabihf | |
| use-cross: true | |
| - name: Strip the CoDiOS firmware | |
| run: cargo strip --release --bin codios-firmware | |
| - name: Package firmware | |
| shell: bash | |
| run: | | |
| mv /home/runner/work/CoDiOS/CoDiOS/target/thumbv7em-none-eabihf/codios-firmware /home/runner/work/CoDiOS/CoDiOS/target/thumbv7em-none-eabihf/codios-firmware.bin | |
| tar -czvf /home/runner/work/CoDiOS/CoDiOS-firmware-release.tgz /home/runner/work/CoDiOS/CoDiOS/target/thumbv7em-none-eabihf/codios-firmware.bin | |
| - name: Publish release artifacts | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: /home/runner/work/CoDiOS/CoDiOS-firmware-release.tgz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |