perf: replace byte-as-char with from_utf8_lossy in fetch_commit_info/… #16
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: Release Build | |
| on: | |
| push: | |
| paths-ignore: | |
| - "*.md" | |
| - "compose.*" | |
| branches: | |
| - "personal" | |
| release: | |
| types: [published] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: Rust project - latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: aarch64-unknown-linux-musl | |
| - name: Install base dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| cmake \ | |
| perl \ | |
| pkg-config \ | |
| libclang-dev \ | |
| musl-tools \ | |
| crossbuild-essential-arm64 | |
| - name: Install musl.cc aarch64 cross-compiler | |
| run: | | |
| wget -q https://github.com/musl-cc/musl.cc/releases/latest/download/aarch64-linux-musl-cross.tgz | |
| tar xzf aarch64-linux-musl-cross.tgz -C /opt | |
| echo "/opt/aarch64-linux-musl-cross/bin" >> $GITHUB_PATH | |
| - name: Versions | |
| id: version | |
| run: echo "VERSION=$(cargo metadata --format-version 1 --no-deps | jq .packages[0].version -r | sed 's/^/v/')" >> "$GITHUB_OUTPUT" | |
| - name: Build | |
| env: | |
| CC: aarch64-linux-musl-gcc | |
| CXX: aarch64-linux-musl-g++ | |
| CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-musl-g++ | |
| run: cargo build --release --target aarch64-unknown-linux-musl | |
| - name: Package release | |
| run: tar czf redlib-aarch64-unknown-linux-musl.tar.gz -C target/aarch64-unknown-linux-musl/release/ redlib | |
| - name: Upload binary as workflow artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: redlib-aarch64-unknown-linux-musl | |
| path: target/aarch64-unknown-linux-musl/release/redlib | |
| retention-days: 1 | |
| - name: Upload release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.VERSION }} | |
| name: ${{ steps.version.outputs.VERSION }} - ${{ github.event.head_commit.message }} | |
| draft: true | |
| files: | | |
| redlib-aarch64-unknown-linux-musl.tar.gz | |
| body: | | |
| - ${{ github.event.head_commit.message }} ${{ github.sha }} | |
| generate_release_notes: true |