update dependencies #52
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 | |
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- 'v*.*.*' | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build rust ${{ matrix.platform.target }}/${{ matrix.platform.os }} | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
# mac target | |
- { os: 'macos-latest', target: 'x86_64-apple-darwin', arch: 'x86_64', osn: 'mac' } | |
- { os: 'macos-latest', target: 'aarch64-apple-darwin', arch: 'aarch64', osn: 'mac' } | |
# linux target | |
- { os: 'ubuntu-latest', target: 'x86_64-unknown-linux-musl', arch: 'x86_64', osn: 'ubuntu-latest' } | |
- { os: 'ubuntu-latest', target: 'aarch64-unknown-linux-musl', arch: 'aarch64', osn: 'ubuntu-latest' } | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: ${{ matrix.platform.target }} | |
- name: Compile | |
uses: clechasseur/rs-cargo@v2 | |
with: | |
use-cross: true | |
command: build | |
args: --release --target ${{ matrix.platform.target }} --bin mehsh_check | |
- name: Copy artifacts | |
run: | | |
mkdir -p artifact | |
mv target/${{ matrix.platform.target }}/release/mehsh_check artifact/mehsh_${{ matrix.platform.osn }}_${{ matrix.platform.arch }} | |
- name: Prepare output artifact for next step | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mehsh_${{ matrix.platform.osn }}_${{ matrix.platform.arch }} | |
path: artifact/mehsh_${{ matrix.platform.osn }}_${{ matrix.platform.arch }} | |
release: | |
runs-on: 'ubuntu-latest' | |
needs: [ "build" ] | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
steps: | |
- name: download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: binaries | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
fail_on_unmatched_files: true | |
files: | | |
binaries/*/* |