Skip to content

Compile Binaries

Compile Binaries #28

Workflow file for this run

name: Compile Binaries
on:
workflow_dispatch:
#push:
#branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build-windows-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build executable
run: cargo build --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ./target/release/nightingale.exe
compression-level: 0
build-windows-x86:
#runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install x86 toolchain
continue-on-error: true # Sometimes the toolchain is already installed
run: |
rustup install stable-i686-pc-windows-msvc
rustup target add i686-pc-windows-msvc
- name: Build executable
run: rustup run stable-i686-pc-windows-msvc cargo build --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ./target/release/nightingale.exe
compression-level: 0
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- name: x64
toolchain: x86_64-unknown-linux-gnu
default: true
- name: x86
toolchain: i686-unknown-linux-gnu
default: false
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt-get install -y gcc-multilib
- name: Install rust toolchain
if: ${{ !matrix.config.default }}
continue-on-error: true # Sometimes the toolchain is already installed
run: |
rustup install stable-${{ matrix.config.toolchain }} --force-non-host
rustup target add ${{ matrix.config.toolchain }}
- name: Build executable
run: rustup run stable-${{ matrix.config.toolchain }} cargo build --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ matrix.config.name }}
path: ./target/release/nightingale
compression-level: 0
build-linux-arm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- name: arm64
toolchain: aarch64-unknown-linux-gnu
- name: armv7
toolchain: armv7-unknown-linux-gnueabihf
steps:
- uses: actions/checkout@v4
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
args: "--release"
target: ${{ matrix.config.toolchain }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ matrix.config.name }}
path: ./target/${{ matrix.config.toolchain }}/release/nightingale
compression-level: 0
build-macos:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: AppleSilicon
toolchain: aarch64-apple-darwin
os: macos-14
- name: Intel
toolchain: x86_64-apple-darwin
os: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build executable
run: cargo build --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ matrix.config.name }}
path: ./target/release/nightingale
compression-level: 0