name: build

on:
  push:
    branches: [ "*" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Build
      run: |
        rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
        rustup target add x86_64-unknown-linux-musl
        cargo build --verbose --release --target x86_64-unknown-linux-musl
    - name: Upload artifact
      uses: actions/upload-artifact@v4
      with:
        name: qft
        path: /home/runner/work/qft/qft/target/x86_64-unknown-linux-musl/release/qft
