Skip to content

0.1.0

0.1.0 #2

name: Release (tools)
on:
release:
types:
- released
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
GH_TOKEN: ${{ github.token }}
defaults:
run:
working-directory: ./cmri_tools
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
# All Tier 1 from https://doc.rust-lang.org/nightly/rustc/platform-support.html
- { target: "x86_64-unknown-linux-gnu", runner: "ubuntu-latest", command: "cargo", zip_name: "linux-x86_64.zip", zip_label: "Linux (64 bit) kernel 3.2+, glibc 2.17+", gem_command: "sudo gem" }
- { target: "aarch64-unknown-linux-gnu", runner: "ubuntu-latest", command: "cross", zip_name: "linux-arm64.zip", zip_label: "Linux (ARM64) kernel 4.1, glibc 2.17+", gem_command: "sudo gem" }
- { target: "i686-unknown-linux-gnu", runner: "ubuntu-latest", command: "cross", zip_name: "linux-i686.zip", zip_label: "Linux (32 bit) kernel 3.2+, glibc 2.17+", gem_command: "sudo gem" }
- { target: "x86_64-pc-windows-msvc", runner: "windows-latest", command: "cargo", zip_name: "windows-x86_64.zip", zip_label: "Windows 10+ / Windows Server 2016+ (64 bit)", gem_command: "gem" }
- { target: "i686-pc-windows-msvc", runner: "windows-latest", command: "cargo", zip_name: "windows-i686.zip", zip_label: "Windows 10+ / Windows Server 2016+ (32 bit)", gem_command: "gem" }
- { target: "x86_64-apple-darwin", runner: "macos-latest", command: "cargo", zip_name: "macos-x86_64.zip", zip_label: "macOS (64 bit) 10.12+, Sierra+", gem_command: "gem" }
- { target: "aarch64-apple-darwin", runner: "macos-latest", command: "cargo", zip_name: "macos-arm64.zip", zip_label: "macOS (ARM64) 11.0+, Big Sur+", gem_command: "gem" }
steps:
- uses: actions/checkout@v3
- name: Update rust
run: rustup update
- name: Install Cross
if: matrix.command == 'cross'
run: cargo install cross --locked
- name: Add Target ${{ matrix.target }}
run: rustup target add ${{ matrix.target }}
- name: Build
run: ${{ matrix.command }} build --bins --release --target ${{ matrix.target }}
- name: Create & Attach zip file
run: ${{ matrix.gem_command }} install rubyzip -v '~> 2.3' --no-document && ruby -r zip ../.github/workflows/release-cmri_tools.rb "${{ matrix.zip_name }}" "${{ matrix.zip_label }}"