build(deps): Bump clap from 4.5.21 to 4.5.23 #213
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 | |
on: | |
push: | |
pull_request: | |
release: | |
types: [published] | |
jobs: | |
commits: | |
name: commits | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: webiny/action-conventional-commits@v1.1.0 | |
linter: | |
name: linter | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Clippy | |
run: cargo clippy --all --all-features -- -D warnings | |
- name: Format | |
run: cargo fmt --all -- --check | |
tests: | |
name: tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build and install binary | |
run: cargo install --path . | |
- name: Run tests | |
working-directory: tests | |
run: ./run_tests.sh | |
linux: | |
name: linux (${{ matrix.arch_name }}) | |
runs-on: ubuntu-latest | |
permissions: write-all | |
needs: tests | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu] | |
include: | |
- arch: x86_64-unknown-linux-gnu | |
arch_name: x86_64 | |
compiler: gcc-aarch64-linux-gnu | |
- arch: aarch64-unknown-linux-gnu | |
arch_name: aarch64 | |
compiler: gcc-aarch64-linux-gnu | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install toolchain | |
run: rustup target add ${{ matrix.arch }} | |
- name: Install build dependencies | |
run: > | |
sudo apt update && sudo apt install -y | |
${{ matrix.compiler }} | |
ruby | |
ruby-dev | |
rubygems | |
rpm | |
libarchive-tools | |
- name: Install fpm | |
run: sudo gem install fpm | |
- name: Build binary | |
run: cargo build --release --target=${{ matrix.arch }} | |
- name: Get binary | |
run: cp target/${{ matrix.arch }}/release/embin . | |
- name: Build debian package | |
run: fpm -t deb -p embin-debian-${{ matrix.arch_name }}.deb --architecture ${{ matrix.arch }} | |
- name: Save debian artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: embin-debian-${{ matrix.arch_name }}.deb | |
path: ./embin-debian-${{ matrix.arch_name }}.deb | |
if-no-files-found: error | |
- name: Build redhat package | |
run: fpm -t rpm -p embin-redhat-${{ matrix.arch_name }}.rpm --architecture ${{ matrix.arch }} | |
- name: Save redhat artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: embin-redhat-${{ matrix.arch_name }}.rpm | |
path: ./embin-redhat-${{ matrix.arch_name }}.rpm | |
if-no-files-found: error | |
- name: Build archlinux package | |
run: fpm -t pacman -p embin-archlinux-${{ matrix.arch_name }}.pkg.tar.zst --architecture ${{ matrix.arch }} | |
- name: Save archlinux artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: embin-archlinux-${{ matrix.arch_name }}.pkg.tar.zst | |
path: ./embin-archlinux-${{ matrix.arch_name }}.pkg.tar.zst | |
if-no-files-found: error | |
- name: Upload packages | |
if: github.event_name == 'release' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
./embin-debian-${{ matrix.arch_name }}.deb | |
./embin-redhat-${{ matrix.arch_name }}.rpm | |
./embin-archlinux-${{ matrix.arch_name }}.pkg.tar.zst | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
mac_os: | |
name: macOS (${{ matrix.arch_name }}) | |
runs-on: macos-latest | |
permissions: write-all | |
needs: tests | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64-apple-darwin, aarch64-apple-darwin] | |
include: | |
- arch: x86_64-apple-darwin | |
arch_name: intel | |
- arch: aarch64-apple-darwin | |
arch_name: silicon | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install toolchain | |
run: rustup target add ${{ matrix.arch }} | |
- name: Build binary | |
run: cargo build --release --target=${{ matrix.arch }} | |
- name: Save artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: embin-macos-${{ matrix.arch_name }} | |
path: target/${{ matrix.arch }}/release/embin | |
if-no-files-found: error | |
- name: Set binary name | |
if: github.event_name == 'release' | |
run: cp target/${{ matrix.arch }}/release/embin embin-macos-${{ matrix.arch_name }} | |
- name: Upload binary | |
if: github.event_name == 'release' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: embin-macos-${{ matrix.arch_name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
windows: | |
name: windows (${{ matrix.arch_name }}) | |
runs-on: windows-latest | |
permissions: write-all | |
needs: tests | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64-pc-windows-msvc, aarch64-pc-windows-msvc] | |
include: | |
- arch: x86_64-pc-windows-msvc | |
arch_name: x86_64 | |
- arch: aarch64-pc-windows-msvc | |
arch_name: aarch64 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install toolchain | |
run: rustup target add ${{ matrix.arch }} | |
- name: Build binary | |
run: cargo build --release --target=${{ matrix.arch }} | |
- name: Save artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: embin-windows-${{ matrix.arch_name }}.exe | |
path: target/${{ matrix.arch }}/release/embin.exe | |
if-no-files-found: error | |
- name: Set binary name | |
if: github.event_name == 'release' | |
run: cp target/${{ matrix.arch }}/release/embin.exe embin-windows-${{ matrix.arch_name }}.exe | |
- name: Upload binary | |
if: github.event_name == 'release' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: embin-windows-${{ matrix.arch_name }}.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |