From 83b0a5878b013952dfb0231b5d493ea7c3ff396f Mon Sep 17 00:00:00 2001 From: tommy Date: Thu, 29 Aug 2024 14:25:48 -0400 Subject: [PATCH] Let's try building for windows using the action --- .gitea/workflows/rust.yml | 16 +++++++++++----- Cargo.toml | 3 ++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/rust.yml b/.gitea/workflows/rust.yml index 2673495..8e6240c 100644 --- a/.gitea/workflows/rust.yml +++ b/.gitea/workflows/rust.yml @@ -12,15 +12,21 @@ jobs: - uses: actions/checkout@v3 - name: Install rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable + targets: "x86_64-pc-windows-gnu" + + - name: Install cross compilation tools + run: sudo apt-get update && sudo apt-get install mingw-w64 -y + + - name: Setup Cache + uses: Swatinem/rust-cache@v2 - name: Build release - run: cargo build --release + run: cargo build --verbose --locked --release --target x86_64-pc-windows-gnu - name: Archive build uses: actions/upload-artifact@v3 with: - name: alt_enter_fix - path: target/release/* + name: alt_enter_fix.exe + path: target/x86_64-pc-windows-gnu/release/alt_enter_fix.exe diff --git a/Cargo.toml b/Cargo.toml index 14aee91..4499b17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,4 +5,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[target.x86_64-pc-windows-gnu] +linker = "x86_64-w64-mingw32-gcc" \ No newline at end of file