Skip to content

app/module/updates: Update release metadata for version 4.2 #165

app/module/updates: Update release metadata for version 4.2

app/module/updates: Update release metadata for version 4.2 #165

Workflow file for this run

---
on:
push:
branches:
- master
pull_request:
jobs:
build-app:
name: Build app
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: true
- name: Validate gradle wrapper checksum
uses: gradle/actions/wrapper-validation@v3
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: gradle
- name: Build and test
# Debug build only since release builds require a signing key
run: ./gradlew --no-daemon build zipDebug -x assembleRelease
build-tool:
name: Build custota-tool
runs-on: ${{ matrix.os }}
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -C strip=symbols -C target-feature=+crt-static
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
# For git describe
fetch-depth: 0
- name: Get version
id: get_version
shell: bash
run: |
echo -n 'version=' >> "${GITHUB_OUTPUT}"
git describe --always \
| sed -E "s/^v//g;s/([^-]*-g)/r\1/;s/-/./g" \
>> "${GITHUB_OUTPUT}"
- name: Get Rust target triple
id: get_target
shell: bash
run: |
echo -n 'name=' >> "${GITHUB_OUTPUT}"
rustc -vV | sed -n 's|host: ||p' >> "${GITHUB_OUTPUT}"
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: custota-tool
- name: Clippy
shell: bash
working-directory: custota-tool
run: |
cargo clippy --release --features static \
--target ${{ steps.get_target.outputs.name }}
- name: Formatting
working-directory: custota-tool
run: cargo fmt -- --check
- name: Build
shell: bash
working-directory: custota-tool
run: |
cargo build --release --features static \
--target ${{ steps.get_target.outputs.name }}
# Due to https://github.com/rust-lang/rust/issues/78210, we have to use
# the --target option, which puts all output files in a different path.
# Symlink that path to the normal output directory so that we don't need
# to specify the Rust triple everywhere.
- name: Symlink target directory
shell: bash
working-directory: custota-tool
run: |
rm -rf target/output
ln -s ${{ steps.get_target.outputs.name }}/release target/output
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: custota-tool-${{ steps.get_version.outputs.version }}-${{ steps.get_target.outputs.name }}
path: |
custota-tool/target/output/custota-tool
custota-tool/target/output/custota-tool.exe