Skip to content

v2.0.2

v2.0.2 #121

Workflow file for this run

name: CI
on:
push:
tags: ["v*"]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build-windows:
name: Windows
runs-on: windows-latest
environment: Windows
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install dependencies
if: runner.os == 'Windows'
run: |
choco install cmake -y
choco install strawberryperl -y
choco install pkgconfiglite -y
choco install llvm -y
choco install nasm -y
shell: cmd
- name: Build
run: |
cargo build --all-features
build-macos:
name: macOS
runs-on: macos-latest
environment: macOS
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
brew update
brew install --formula cmake pkg-config llvm
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
run: |
cargo build --all-features
build-linux:
name: Linux
needs: [build-windows, build-macos]
runs-on: ubuntu-latest
environment: Linux
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install depends
run: |
sudo apt update && sudo apt install cmake build-essential clang libclang-dev -y
- name: Build & Tests
run: |
cargo test --all-features
- name: Get tag
if: startsWith(github.ref, 'refs/tags/')
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true
- name: Tag Check
run: |
echo "tag=${{ steps.tag.outputs.tag }}" >> $GITHUB_ENV
echo "tag=${{ steps.tag.outputs.tag }}" >> $GITHUB_OUTPUT
if [ -z "${{ steps.tag.outputs.tag }}" ]; then
echo "tag=latest" >> $GITHUB_OUTPUT
echo "tag=latest" >> $GITHUB_ENV
fi
- uses: katyo/publish-crates@v2
if: startsWith(github.ref, 'refs/tags/')
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
ignore-unpublished-changes: true
- name: Upload binaries to GitHub Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.CR_PAT }}
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
generate_release_notes: true