tommy 9bdbb3672a
Some checks failed
Rust / build (, linux, x86_64-unknown-linux-gnu) (push) Failing after 50s
Rust / build (.exe, windows, x86_64-pc-windows-gnu) (push) Successful in 1m34s
surely this works first try right guys?
2025-06-03 01:29:13 -04:00

47 lines
1.2 KiB
YAML

name: Rust
on:
push:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-pc-windows-gnu
- x86_64-unknown-linux-gnu
include:
- target: x86_64-pc-windows-gnu
os: windows
extension: .exe
- target: x86_64-unknown-linux-gnu
os: linux
extension: ""
steps:
- uses: actions/checkout@v3
- name: Install rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross compilation tools
if: matrix.target == 'x86_64-pc-windows-gnu'
run: sudo apt-get update && sudo apt-get install mingw-w64 -y
- name: Setup Cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Build release
run: cargo build --verbose --locked --release --target ${{ matrix.target }}
- name: Archive build
uses: actions/upload-artifact@v3
with:
name: alt_enter_fix-${{ matrix.os }}
path: target/${{ matrix.target }}/release/alt_enter_fix${{ matrix.extension }}