Skip to content

Commit

Permalink
use new recipe for setup environment
Browse files Browse the repository at this point in the history
  • Loading branch information
redthing1 committed Jul 16, 2024
1 parent e1f7a49 commit 3413eca
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,42 @@ jobs:
test-windows:
runs-on: windows-latest
env:
DRAY_VERSION: 5.0.0-r1
RAYLIB_PREBUILD_VERSION: 5.0.0-r1
DRAY_VERSION: 5.0.0-r4
steps:
- uses: actions/checkout@v3
- uses: dlang-community/setup-dlang@4c99aa991ce7d19dd3064de0a4f2f6b2f152e2d7
- uses: dlang-community/setup-dlang@v2
with:
compiler: ldc
- name: 'Setup Windows Build Environment'
shell: pwsh
run: |
git submodule update --init --recursive
curl -L https://github.com/ldc-developers/ldc/releases/download/v1.29.0/ldc2-1.29.0-windows-x64.7z --output ldc2-1.29.0-windows-x64.7z
7z x ldc2-1.29.0-windows-x64.7z
curl -L https://github.com/redthing1/dray/releases/download/v$env:DRAY_VERSION/raylib-dev_win64_msvc16.zip.zip --output raylib-dev_win64_msvc16.zip.zip
echo "get raylib prebuild"
curl -L https://github.com/redthing1/dray/releases/download/v$env:RAYLIB_PREBUILD_VERSION/raylib-dev_win64_msvc16.zip.zip --output raylib-dev_win64_msvc16.zip.zip
7z x raylib-dev_win64_msvc16.zip.zip
7z x raylib-dev_win64_msvc16.zip
curl -L https://github.com/redthing1/dray/releases/download/v4.0.0-r3/winlibs_extra.7z --output winlibs_extra.7z
7z x winlibs_extra.7z
curl -L https://github.com/glfw/glfw/releases/download/3.3.7/glfw-3.3.7.bin.WIN64.zip --output glfw-3.3.7.bin.WIN64.zip
unzip glfw-3.3.7.bin.WIN64.zip
move glfw-3.3.7.bin.WIN64/lib-vc2022/glfw3_mt.lib ./glfw3_mt.lib
mkdir ext
cd ext
git clone --depth 1 --branch v$env:DRAY_VERSION https://github.com/redthing1/dray
cd dray
move ../../raylib-dev_win64_msvc16/lib/raylib.lib ./raylib.lib
move ../../WinMM.lib ./WinMM.lib
set WINLIB_BASE="../../ldc2-1.28.1-windows-x64/lib/"
set WINLIB_MINGW="../../ldc2-1.28.1-windows-x64/lib/mingw"
echo $WINLIB_BASE
dub build
cd ../..
move ext/dray/WinMM.lib ./WinMM.lib
curl -L https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.bin.WIN64.zip --output glfw-3.4.bin.WIN64.zip
unzip glfw-3.4.bin.WIN64.zip
move glfw-3.4.bin.WIN64/lib-vc2022/glfw3_mt.lib ./glfw3_mt.lib
echo "prebuild dray with libs"
dub fetch dray@$env:DRAY_VERSION
$DRAY_PATH = "$env:LOCALAPPDATA/dub/packages/dray/$env:DRAY_VERSION/dray"
echo "using dray path: $DRAY_PATH"
dub list dray@$env:DRAY_VERSION
cp raylib-dev_win64_msvc16/lib/raylib.lib $DRAY_PATH/raylib.lib
cp glfw3_mt.lib $DRAY_PATH/glfw3_mt.lib
dub build dray@$env:DRAY_VERSION
ls $DRAY_PATH
echo "show files"
dir
- name: 'Build'
run: |
dub add-override dray $env:DRAY_VERSION ./ext/dray
move ext/dray/raylib.lib ./raylib.lib
dub build
- name: 'Run Tests'
run: |
dub test
Expand Down

0 comments on commit 3413eca

Please sign in to comment.