Skip to content

Replace StringHelper with builtin Text wrapper #90

Replace StringHelper with builtin Text wrapper

Replace StringHelper with builtin Text wrapper #90

Workflow file for this run

name: CI
on:
pull_request:
push:
tags:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo clippy --workspace --all-targets --all-features -- --deny warnings --allow unknown_lints
- run: cargo fmt --all --check
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo test --workspace --all-targets --all-features
cross-build:
runs-on: ubuntu-24.04
permissions:
contents: write
env:
# see https://woodruffw.github.io/zizmor/audits/#template-injection
REF_NAME: ${{ github.ref_name }}
# renovate: datasource=crate depName=cross versioning=semver
CROSS_VERSION: 0.2.5
TARGET_ARCH: aarch64-unknown-linux-gnu
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo install cross --vers ${CROSS_VERSION}
- run: cross build --release --target=${TARGET_ARCH}
- run: cp target/${TARGET_ARCH}/release/clubfridge-neo clubfridge-neo
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
- run: tar czf clubfridge-neo-${REF_NAME}-${TARGET_ARCH}.tar.gz clubfridge-neo
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
with:
name: clubfridge-neo-${{ env.REF_NAME }}-${{ env.TARGET_ARCH }}.tar.gz
path: clubfridge-neo-${{ env.REF_NAME }}-${{ env.TARGET_ARCH }}.tar.gz
- uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: clubfridge-neo-${{ env.REF_NAME }}-${{ env.TARGET_ARCH }}.tar.gz