From 3413eca319d450b6c04eeb2b5855c08a6d54dd17 Mon Sep 17 00:00:00 2001 From: redthing1 Date: Mon, 15 Jul 2024 17:54:52 -0700 Subject: [PATCH] use new recipe for setup environment --- .github/workflows/windows.yml | 51 ++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 983ab746..19d49361 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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