Skip to content

Merge commit 'bd2dcc032a8d55b65f8b80e6af87d89c772f38f8' #146

Merge commit 'bd2dcc032a8d55b65f8b80e6af87d89c772f38f8'

Merge commit 'bd2dcc032a8d55b65f8b80e6af87d89c772f38f8' #146

Workflow file for this run

name: Rust Build
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os }} (Rust ${{ matrix.toolchain }})
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
toolchain: [nightly-2026-01-18, nightly]
include:
- os: ubuntu-latest
toolchain: nightly-2026-01-18
artifact-name: kqt-linux
binary-ext: ''
upload-artifact: true
- os: windows-latest
toolchain: nightly-2026-01-18
artifact-name: kqt-windows
binary-ext: '.exe'
upload-artifact: true
- os: ubuntu-latest
toolchain: nightly
binary-ext: ''
upload-artifact: false
- os: windows-latest
toolchain: nightly
binary-ext: '.exe'
upload-artifact: false
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Get commit SHA
id: git-info
shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Install Rust ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: rust
key: ${{ matrix.toolchain }}
- name: Build release binaries
working-directory: ./rust
env:
RUSTFLAGS: "-D warnings"
run: cargo build --package kqt --release --verbose
- name: Prepare binaries for upload
if: matrix.upload-artifact == true
shell: bash
run: |
mkdir -p binaries
cp rust/target/release/kqt${{ matrix.binary-ext }} binaries/
- name: Upload binaries
if: matrix.upload-artifact == true
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}-${{ steps.git-info.outputs.sha_short }}
path: binaries/*
if-no-files-found: error