Skip to content

Windows dependencies caching #7

Windows dependencies caching

Windows dependencies caching #7

name: Windows dependencies caching
on:
workflow_call:
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
defaults:
run:
shell: pwsh
jobs:
build_wx:
runs-on: windows-latest
steps:
- name: WX Cache
uses: actions/cache@v3
with:
path: builds/wxWidgets
key: ${{ runner.os }}-cache-key-wx
- run: Invoke-WebRequest -URI https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.2.1/wxWidgets-3.2.2.1.zip -OutFile sources.zip
- run: Expand-Archive ./sources.zip
- run: cmake -B "${{github.workspace}}/cmake_build" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/builds/wxWidgets" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=OFF
working-directory: sources
- run: cmake --build "${{github.workspace}}/cmake_build" --config ${{env.BUILD_TYPE}}
working-directory: sources
- run: cmake --install "${{github.workspace}}/cmake_build"
working-directory: sources
- run: Copy-Item -Force -Path "${{github.workspace}}/builds/wxWidgets/lib/vc_x64_lib/mswu/wx/setup.h" -Destination "${{github.workspace}}/builds/wxWidgets/include/wx"
build_lua:
runs-on: windows-latest
steps:
- name: Lua Cache
uses: actions/cache@v3
with:
path: builds/lua
key: ${{ runner.os }}-cache-key-lua
- run: Invoke-WebRequest -URI https://www.lua.org/ftp/lua-5.4.4.tar.gz -OutFile lua-5.4.4.tar.gz
- run: tar -xzf lua-5.4.4.tar.gz
- working-directory: lua-5.4.4
run: Invoke-WebRequest -URI https://raw.githubusercontent.com/KAHR-Alpha/Aether/main/contribs/lua_cmakelist/CMakeLists.txt -OutFile CMakeLists.txt
- run: cmake -B "${{github.workspace}}/cmake_build" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/builds/lua" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
working-directory: lua-5.4.4
- run: cmake --build "${{github.workspace}}/cmake_build" --config ${{env.BUILD_TYPE}}
working-directory: lua-5.4.4
- run: cmake --install "${{github.workspace}}/cmake_build"
working-directory: lua-5.4.4
build_zlib:
runs-on: windows-latest
steps:
- name: Zlib Cache
uses: actions/cache@v3
with:
path: builds/zlib
key: ${{ runner.os }}-cache-key-zlib
- run: Invoke-WebRequest -URI https://zlib.net/zlib131.zip -OutFile sources.zip
- run: Expand-Archive ./sources.zip
- run: cmake -B "${{github.workspace}}/cmake_build" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/builds/zlib" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
working-directory: sources/zlib-1.3.1
- run: cmake --build "${{github.workspace}}/cmake_build" --config ${{env.BUILD_TYPE}}
working-directory: sources/zlib-1.3.1
- run: cmake --install "${{github.workspace}}/cmake_build"
working-directory: sources/zlib-1.3.1
build_libpng:
runs-on: windows-latest
needs: build_zlib
steps:
- name: Zlib Cache
uses: actions/cache@v3
with:
path: builds/zlib
key: ${{ runner.os }}-cache-key-zlib
- name: Libpng Cache
uses: actions/cache@v3
with:
path: builds/libpng
key: ${{ runner.os }}-cache-key-libpng
- run: Invoke-WebRequest -UserAgent "Wget" -URI https://sourceforge.net/projects/libpng/files/latest/download -OutFile sources.zip
- run: Expand-Archive ./sources.zip
- run: cmake -B "${{github.workspace}}/cmake_build" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/builds/libpng" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_PREFIX_PATH="${{github.workspace}}/builds/zlib" -DPNG_SHARED=OFF -DPNG_STATIC=ON
working-directory: sources/lpng1642
- run: cmake --build "${{github.workspace}}/cmake_build" --config ${{env.BUILD_TYPE}}
working-directory: sources/lpng1642
- run: cmake --install "${{github.workspace}}/cmake_build"
working-directory: sources/lpng1642
build_freetype:
runs-on: windows-latest
steps:
- name: Freetype Cache
uses: actions/cache@v3
with:
path: builds/freetype
key: ${{ runner.os }}-cache-key-freetype
- run: Invoke-WebRequest -UserAgent "Wget" -URI https://sourceforge.net/projects/freetype/files/latest/download -OutFile sources.zip
- run: Expand-Archive ./sources.zip
- run: cmake -B "${{github.workspace}}/cmake_build" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/builds/freetype" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
working-directory: sources/freetype-2.13.2
- run: cmake --build "${{github.workspace}}/cmake_build" --config ${{env.BUILD_TYPE}}
working-directory: sources/freetype-2.13.2
- run: cmake --install "${{github.workspace}}/cmake_build"
working-directory: sources/freetype-2.13.2
get_fftw:
runs-on: windows-latest
steps:
- name: FFTW Cache
uses: actions/cache@v3
with:
path: builds/fftw
key: ${{ runner.os }}-cache-key-fftw
- uses: ilammy/msvc-dev-cmd@v1
- run: Invoke-WebRequest -URI https://fftw.org/pub/fftw/fftw-3.3.5-dll64.zip -OutFile fftw.zip
- run: Expand-Archive ./fftw.zip
- run: dir
- run: mkdir builds
- run: Copy-Item -Force -Path "fftw" -Destination "builds/fftw" -Recurse
- run: dir builds
- run: dir builds/fftw
- name: Generate FFTW Lib
working-directory: builds/fftw
run: lib /def:libfftw3-3.def
build_eigen:
runs-on: windows-latest
steps:
- name: Eigen Cache
uses: actions/cache@v3
with:
path: builds/eigen
key: ${{ runner.os }}-cache-key-eigen
- run: Invoke-WebRequest -URI https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.zip -OutFile eigen-3.4.0.zip
- run: Expand-Archive ./eigen-3.4.0.zip
- name: build
run: cmake -B "${{github.workspace}}/build" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/builds/eigen" -DCMAKE_BUILD_TYPE=Release
working-directory: eigen-3.4.0/eigen-3.4.0
- run: cmake --build "${{github.workspace}}/build"
working-directory: eigen-3.4.0/eigen-3.4.0
- run: cmake --install "${{github.workspace}}/build"
working-directory: eigen-3.4.0/eigen-3.4.0