Skip to content

WIP

WIP #18

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
branches: fix-windows-build
tags: "v*"
jobs:
metadata:
runs-on: ubuntu-latest
outputs:
rust-version: ${{ steps.determine-rust-version.outputs.version }}
engine-version: ${{ steps.determine-engine-version.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: determine-rust-version
name: Determine Rust version
run: |
version=$(grep -m 1 'rust-version' Cargo.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)
echo "Rust version: $version"
echo "version=$version" >> "$GITHUB_OUTPUT"
- id: determine-engine-version
name: Determine Engine version
run: |
version="${GITHUB_REF##*/}"
echo "Engine version: $version"
echo "version=$version" >> "$GITHUB_OUTPUT"
build-windows:
runs-on: windows-latest
needs: [metadata]
strategy:
matrix:
include:
- exec_postfix: "x86_64-v4"
rustflags: "-Ctarget-feature=+crt-static,-bmi2 -Ctarget-cpu=x86-64-v4"
# - exec_postfix: "x86_64-v3"
# rustflags: "-Ctarget-feature=+crt-static,-bmi2 -Ctarget-cpu=x86-64-v3"
# - exec_postfix: "x86_64-v2"
# rustflags: "-Ctarget-feature=+crt-static -Ctarget-cpu=x86-64-v2"
# - exec_postfix: "x86_64-v1"
# rustflags: "-Ctarget-feature=+crt-static"
steps:
- uses: actions/checkout@v4
- name: Build
env:
RUSTFLAGS: '${{ matrix.rustflags }}'
CFLAGS: '/experimental:c11atomics'
run: |
rustup override set ${{ needs.metadata.outputs.rust-version }}
rustup target add x86_64-pc-windows-msvc
cargo build --release --features release --target x86_64-pc-windows-msvc
mv .\target\x86_64-pc-windows-msvc\release\engine.exe tcheran-${{ needs.metadata.outputs.engine-version }}-windows-${{ matrix.exec_postfix }}.exe
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: tcheran-windows-${{ matrix.exec_postfix }}
path: tcheran-${{ needs.metadata.outputs.engine-version }}-windows-${{ matrix.exec_postfix }}.exe