Skip to content

Commit

Permalink
add windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
dguittet committed May 15, 2024
1 parent 65866a1 commit 932a6ad
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,83 @@ jobs:
${{ env.GH_WORKSPACE }}/wex/build_linux/tools/DView*
${{ env.GH_WORKSPACE }}/wex/build_linux/tools/wexsandbox*
${{ env.GH_WORKSPACE }}/wex/build_linux/wex*.a
build-on-windows:
runs-on: windows-latest
steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Download wxWidgets
shell: bash
run: |
curl -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxMSW-3.2.3_vc14x_x64_Dev.7z -o wxMSW-3.2.3_vc14x_x64_Dev.7z
mkdir wxMSW-3.2.3_vc14x_x64_Dev
7z x wxMSW-3.2.3_vc14x_x64_Dev.7z -o$GITHUB_WORKSPACE/wxMSW-3.2.3_vc14x_x64_Dev
curl -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxMSW-3.2.3_vc14x_x64_ReleaseDLL.7z -o wxMSW-3.2.3_vc14x_x64_ReleaseDLL.7z
7z x wxMSW-3.2.3_vc14x_x64_ReleaseDLL.7z -o$GITHUB_WORKSPACE/wxMSW-3.2.3_vc14x_x64_ReleaseDLL
cp wxMSW-3.2.3_vc14x_x64_ReleaseDLL/lib/vc14x_x64_dll/* wxMSW-3.2.3_vc14x_x64_Dev/lib/vc14x_x64_dll
curl -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxWidgets-3.2.3-headers.7z -o wxWidgets-3.2.3-headers.7z
7z x wxWidgets-3.2.3-headers.7z -o$GITHUB_WORKSPACE/wxMSW-3.2.3_vc14x_x64_Dev
WXMSW3=$GITHUB_WORKSPACE\\wxMSW-3.2.3_vc14x_x64_Dev
echo "WXMSW3=$WXMSW3" >> $GITHUB_ENV
WXWIN=$GITHUB_WORKSPACE\\wxMSW-3.2.3_vc14x_x64_Dev
echo "WXWIN=$WXWIN" >> $GITHUB_ENV
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.24.x'

- name: Get git ref of sibling dependency LK
run: |
ref=$(git ls-remote --exit-code git://github.com/NREL/lk.git refs/heads/develop | awk '{print $1}')
echo "ref_of_lk=$ref" | tee --append $GITHUB_ENV
- name: Get cached build data of sibling dependency LK
uses: actions/cache@v2
id: cachedlk
with:
path: ${{ env.GH_WORKSPACE }}/lk
key: ${{ env.RUNS_ON }}-${{ env.ref_of_lk }}-LK
- name: Clone sibling dependency LK
if: steps.cachedlk.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
ref: ${{ env.ref_of_lk }}
path: lk
repository: NREL/lk
- name: Build LK
if: steps.cachedlk.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/lk
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_SYSTEM_VERSION=10.0 -DSAM_SKIP_TOOLS=1 ..
MSBuild.exe .\lk.sln /t:Build /p:Configuration=Release
echo "LKDIR=$GITHUB_WORKSPACE/lk" >>$GITHUB_ENV
echo "LKD_LIB=$GITHUB_WORKSPACE/lk/build_linux" >>$GITHUB_ENV
echo "RAPIDJSONDIR=$GITHUB_WORKSPACE/ssc" >>$GITHUB_ENV

- name: Checkout
uses: actions/checkout@v2
with:
path: wex
- name: Build WEX
run: |
cd $GITHUB_WORKSPACE/wex
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_SYSTEM_VERSION=10.0 ..
MSBuild.exe .\wex.sln /t:Build /p:Configuration=Release
- name: Save static lib, Dview & wexsandbox
uses: actions/upload-artifact@v2
with:
name: WEX-${{ env.RUNS_ON }}-x86_64
path: |
${{ env.GH_WORKSPACE }}/wex/build_linux/tools/DView*
${{ env.GH_WORKSPACE }}/wex/build_linux/tools/wexsandbox*
${{ env.GH_WORKSPACE }}/wex/build_linux/wex*.a

0 comments on commit 932a6ad

Please sign in to comment.