ci: add windows build action #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 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 | |
run: | | |
mkdir additional-libs | |
copy ffmpeg-binary\ffmpeg*\bin\*.dll additional-libs | |
copy ffmpeg-binary\ffmpeg*\bin\*.lib additional-libs | |
- name: Download sdl2 | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: libsdl-org/SDL | |
latest: true | |
fileName: '*win*x64*.zip' | |
out-file-path: sdl2-binary | |
extract: true | |
- name: Download sdl2-mixer | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: libsdl-org/SDL_mixer | |
latest: true | |
fileName: '*win*x64*.zip' | |
out-file-path: sdl2-mixer-binary | |
extract: true | |
- name: Download sdl2-ttf | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: libsdl-org/SDL_ttf | |
latest: true | |
fileName: '*win*x64*.zip' | |
out-file-path: sdl2-ttf-binary | |
extract: true | |
- name: Download sdl2-image | |
uses: robinraju/release-downloader@v1.10 | |
with: | |
repository: libsdl-org/SDL_image | |
latest: true | |
fileName: '*win*x64*.zip' | |
out-file-path: sdl2-image-binary | |
extract: true | |
- name: Copy sdl2 library files | |
run: | | |
copy sdl2-binary/*.dll additional-libs | |
copy sdl2-mixer-binary/*.dll additional-libs | |
copy sdl2-mixer-binary/optional/*.dll additional-libs | |
copy sdl2-image-binary/*.dll additional-libs | |
copy sdl2-image-binary/optional/*.dll additional-libs | |
copy sdl2-ttf-binary/*.dll additional-libs | |
- name: Display downloaded libary files | |
run: | | |
Get-ChildItem -Recurse additional-libs | |
- name: Build | |
run: | | |
$env:Path += ";" + $pwd + "\additional-libs" | |
cargo build --verbose | |
- name: Copy release binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-binary-release | |
path: ./target/release/bidrum.exe |