see changelog for 0.6 #21
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
on: [ pull_request, workflow_dispatch ] | |
name: CI | |
env: | |
RUSTFLAGS: -D warnings --cfg=web_sys_unstable_apis | |
RUSTDOCFLAGS: -D warnings | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-features | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --lib | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: clippy | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
build: | |
needs: [ check, test, fmt, clippy ] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
extension: "" | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
extension: "" | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
extension: "" | |
steps: | |
- name: Building ${{ matrix.target }} | |
run: echo "${{ matrix.target }}" | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ matrix.target }} | |
override: true | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake libssl-dev pkg-config libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev | |
- name: Install macOS dependencies | |
if: runner.os == 'macOS' | |
run: brew install cmake | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --verbose --release --target=${{ matrix.target }} | |
- name: Prepare artifacts | |
run: | | |
mkdir artifacts | |
cp target/${{ matrix.target }}/release/indyforge${{ matrix.extension }} artifacts/indyforge-${{ matrix.target }}${{ matrix.extension }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: indyforge-${{ matrix.target }} | |
path: artifacts/indyforge-${{ matrix.target }}${{ matrix.extension }} | |
if-no-files-found: error | |
- name: Upload Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: artifacts/indyforge-${{ matrix.target }}${{ matrix.extension }} | |
asset_name: indyforge-${{ matrix.target }}${{ matrix.extension }} | |
tag: ${{ github.ref }} | |
overwrite: true |