Skip to content

Commit

Permalink
ci: add windows build action
Browse files Browse the repository at this point in the history
  • Loading branch information
LiteHell committed Apr 30, 2024
1 parent 591200f commit 5f2d57c
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build on Windows

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

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat
- name: Download FFmpeg binaries
uses: robinraju/release-downloader@v1.10
with:
repository: BtbN/FFmpeg-Builds
latest: true
fileName: ffmpeg-n7*-latest-win64-lgpl-shared*.zip
out-file-path: ffmpeg-binary
extract: true
- name: Copy FFmpeg files
mkdir ffmpeg-lib
copy ffmpeg-binary\ffmpeg*\bin\*.dll ffmpeg-lib
copy ffmpeg-binary\ffmpeg*\bin\*.lib ffmpeg-lib
- name: Install sdl2
run: vcpkg install sdl2 sdl2-image sdl2-mixer sdl2-ttf
- name: Build
run: |
set VCPKG_ROOT=.\vcpkg
$env:Path += ";" + $pwd + "\ffmpeg-lib"
cargo build --verbose
- name: Copy release binary
uses: actions/upload-artifact@v4
with:
name: windows-binary-release
path: ./target/release/bidrum.exe

0 comments on commit 5f2d57c

Please sign in to comment.