Skip to content

Commit

Permalink
build lk always
Browse files Browse the repository at this point in the history
  • Loading branch information
dguittet committed May 21, 2024
1 parent d83cf3d commit 29a8ab5
Showing 1 changed file with 24 additions and 26 deletions.
50 changes: 24 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
with:
cmake-version: '3.24.x'
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: wex
- name: Download wxWidgets
run: |
cd $HOME
Expand Down Expand Up @@ -52,20 +54,18 @@ jobs:
ref=$(git ls-remote --exit-code https://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
uses: actions/cache@v4
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
uses: actions/checkout@v4
with:
ref: ${{ env.ref_of_lk }}
path: lk
repository: NREL/lk
- name: Build LK
if: steps.cachedlk.outputs.cache-hit == 'true'
run: |
ls
ls $WXMSW3
Expand All @@ -83,14 +83,13 @@ jobs:
ref=$(git ls-remote --exit-code https://github.com/NREL/ssc.git refs/heads/develop | awk '{print $1}')
echo "ref_of_ssc=$ref" | tee --append $GITHUB_ENV
- name: Get cached build data of sibling dependency SSC
uses: actions/cache@v2
uses: actions/cache@v4
id: cachedssc
with:
path: ${{ env.GH_WORKSPACE }}/ssc
key: ${{ env.RUNS_ON }}-${{ env.ref_of_ssc }}-SSC
- name: Clone sibling dependency SSC
if: steps.cachedssc.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ env.ref_of_ssc }}
path: ssc
Expand All @@ -102,7 +101,7 @@ jobs:
cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug
cmake --build build_linux
- name: Save static lib, Dview & wexsandbox
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: WEX-linux-x86_64
path: |
Expand All @@ -116,9 +115,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
uses: microsoft/setup-msbuild@v4
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: wex
- name: Download wxWidgets
Expand All @@ -132,7 +131,7 @@ jobs:
dir wx-3.2.3
echo "WXMSW3=$HOME/wx-3.2.3" >>$GITHUB_ENV
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
uses: jwlawson/actions-setup-cmake@v4
with:
cmake-version: '3.24.x'
- name: Get branch name
Expand All @@ -148,13 +147,13 @@ jobs:
git ls-remote --heads --exit-code https://github.com/${GITHUB_REPOSITORY_OWNER}/lk.git $GIT_BRANCH
if [[ $? != "0" ]]; then echo "LK_BRANCH=develop" >> $GITHUB_ENV; else echo "LK_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV; fi
- name: Checkout lk
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: lk
repository: ${{ env.GITHUB_REPOSITORY_OWNER }}/lk
ref: ${{ env.LK_BRANCH }}
- name: Checkout ssc
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ssc
repository: ${{ env.GITHUB_REPOSITORY_OWNER }}/ssc
Expand Down Expand Up @@ -184,7 +183,7 @@ jobs:
MSBuild.exe .\wex.sln /t:Build /p:Configuration=Release
- name: Save static lib, Dview & wexsandbox
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: WEX-windows-x86_64
path: |
Expand All @@ -207,13 +206,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

with:
path: wex

- name: Download wxWidgets
run: |
cd $HOME
python --version
pip install requests
python $GITHUB_WORKSPACE/.github/workflows/download_wx.py wx-3.2.3
python $GITHUB_WORKSPACE/wex/.github/workflows/download_wx.py wx-3.2.3
ls
ls wx-3.2.3
echo "WXMSW3=$HOME/wx-3.2.3" >>$GITHUB_ENV
Expand All @@ -227,20 +228,18 @@ jobs:
ref=$(git ls-remote --exit-code https://github.com/NREL/lk.git refs/heads/develop | awk '{print $1}')
echo "ref_of_lk=$ref" | tee -a $GITHUB_ENV
- name: Get cached build data of sibling dependency LK
uses: actions/cache@v2
uses: actions/cache@v4
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
uses: actions/checkout@v4
with:
ref: ${{ env.ref_of_lk }}
path: lk
repository: NREL/lk
- name: Build LK
if: steps.cachedlk.outputs.cache-hit == 'true'
run: |
ls
ls $WXMSW3
Expand All @@ -258,21 +257,20 @@ jobs:
ref=$(git ls-remote --exit-code https://github.com/NREL/ssc.git refs/heads/develop | awk '{print $1}')
echo "ref_of_ssc=$ref" | tee -a $GITHUB_ENV
- name: Get cached build data of sibling dependency SSC
uses: actions/cache@v2
uses: actions/cache@v4
id: cachedssc
with:
path: ${{ env.GH_WORKSPACE }}/ssc
key: ${{ env.RUNS_ON }}-${{ env.ref_of_ssc }}-SSC
- name: Clone sibling dependency SSC
if: steps.cachedssc.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ env.ref_of_ssc }}
path: ssc
repository: NREL/ssc

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
uses: jwlawson/actions-setup-cmake@v4
with:
cmake-version: '3.24.x'

Expand All @@ -282,7 +280,7 @@ jobs:
cmake --build build_linux
- name: Save static lib, Dview & wexsandbox
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: WEX-${{ matrix.os }}-x86_64
path: |
Expand Down

0 comments on commit 29a8ab5

Please sign in to comment.