Add option --with-threads #22
Workflow file for this run
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
name: CI Workflow | |
on: | |
push: | |
branches: ["main"] | |
tags: ["*"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create release | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh release create ${{ github.ref_name }} | |
build: | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
matrix: | |
include: | |
# Linux | |
- name: linux-amd64 | |
runner: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
command: cargo | |
# Android | |
- name: android-arm | |
runner: ubuntu-latest | |
target: aarch64-linux-android | |
command: cross | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install cross | |
if: matrix.command == 'cross' | |
shell: bash | |
run: | | |
cargo install cross --git https://github.com/cross-rs/cross | |
- name: Build binary | |
run: ${{ matrix.command }} build --release --target ${{ matrix.target }} | |
- name: Create archive | |
if: startsWith(github.ref, 'refs/tags/') | |
id: archive | |
shell: bash | |
run: | | |
DIRECTORY="loadtimer-${{ github.ref_name }}-${{ matrix.target}}" | |
mkdir "${DIRECTORY}" | |
cp target/${{ matrix.target }}/release/loadtimer "${DIRECTORY}/" | |
7z a "${DIRECTORY}.zip" "${DIRECTORY}" | |
echo "path=${DIRECTORY}.zip" >> ${GITHUB_OUTPUT} | |
- name: Release | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh release upload ${{ github.ref_name }} ${{ steps.archive.outputs.path }} |