Skip to content

v0.4.1

v0.4.1 #15

Workflow file for this run

name: Release
on:
release:
types: [published]
# Needed to upload artifacts to releases
permissions:
contents: write
id-token: write
jobs:
build-and-upload:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: i686-unknown-linux-gnu
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: i686-pc-windows-msvc
- os: windows-latest
target: aarch64-pc-windows-msvc
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install dependencies
if: matrix.os == 'macos-latest'
run: brew install openssl
- name: Install dependencies (macOS)
if: matrix.os == 'macos-latest'
run: brew install openssl
- name: Install dependencies (Linux x86_32)
if: matrix.os == 'ubuntu-latest' && matrix.target == 'i686-unknown-linux-gnu'
run: sudo apt-get install -y gcc-multilib
- name: Install dependencies (Linux aarch64)
if: matrix.os == 'ubuntu-latest' && matrix.target == 'aarch64-unknown-linux-gnu'
run: sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Check i18n
shell: bash
run: scripts/find-missing-i18n.sh
continue-on-error: true
- name: Test
if: (matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu') || (matrix.os == 'windows-latest' && matrix.target == 'x86_64-pc-windows-msvc') || (matrix.os == 'macos-latest' && matrix.target == 'x86_64-apple-darwin')
run: cargo test --target ${{ matrix.target }}
- name: Rename Binary
shell: bash
run: |
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
mv target/${{ matrix.target }}/release/gdvm.exe target/${{ matrix.target }}/release/gdvm-${{ matrix.target }}.exe
else
mv target/${{ matrix.target }}/release/gdvm target/${{ matrix.target }}/release/gdvm-${{ matrix.target }}
fi
- name: Upload Binary
uses: softprops/action-gh-release@v2
with:
files: |
${{ matrix.os == 'windows-latest' && format('target/{0}/release/gdvm-{0}.exe', matrix.target) || format('target/{0}/release/gdvm-{0}', matrix.target) }}