-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from NREL/github_actions_patch
Update deprecated Ubuntu workflow
- Loading branch information
Showing
1 changed file
with
2 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,113 +5,8 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
build-on-ubuntu1804: | ||
runs-on: ubuntu-18.04 | ||
env: | ||
RUNS_ON: ubuntu1804 | ||
GH_WORKSPACE: /home/runner/work/wex/wex #= $GITHUB_WORKSPACE | ||
steps: | ||
- name: Setup cmake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: '3.24.x' | ||
- name: Test cmake version | ||
run: cmake --version | ||
- name: Install OS dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
build-essential \ | ||
freeglut3-dev \ | ||
g++ \ | ||
libcurl4-openssl-dev \ | ||
libfontconfig-dev \ | ||
libgl1-mesa-dev \ | ||
libgtk2.0-dev \ | ||
mesa-common-dev \ | ||
unzip | ||
- name: Get GCC version | ||
run: gcc --version | ||
- name: Get libc version | ||
run: ldd --version | ||
|
||
- name: Install wxWidgets | ||
run: | | ||
sudo apt-get install -y libwxgtk*-dev | ||
sudo ln -s $(which wx-config) /usr/local/bin/wx-config-3 | ||
wx-config-3 --cflags | grep I | ||
- name: Get git ref of sibling dependency LK | ||
run: | | ||
ref=$(git ls-remote --exit-code git://github.com/NREL/lk.git refs/heads/patch | 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 | ||
cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug | ||
cmake --build build_linux -- -j | ||
- name: Set LKDIR and LKD_LIB envs | ||
run: | | ||
echo "LKDIR=$GITHUB_WORKSPACE/lk" >>$GITHUB_ENV | ||
echo "LKD_LIB=$GITHUB_WORKSPACE/lk/build_linux" >>$GITHUB_ENV # iff CMAKE_BUILD_TYPE=Debug | ||
- name: Set RAPIDJSONDIR | ||
run: | | ||
echo "RAPIDJSONDIR=$GITHUB_WORKSPACE/ssc" >>$GITHUB_ENV | ||
- name: Get git ref of sibling dependency SSC | ||
run: | | ||
ref=$(git ls-remote --exit-code git://github.com/NREL/ssc.git refs/heads/patch | 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 | ||
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 | ||
with: | ||
ref: ${{ env.ref_of_ssc }} | ||
path: ssc | ||
repository: NREL/ssc | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: wex | ||
- name: Build WEX | ||
run: | | ||
cd $GITHUB_WORKSPACE/wex | ||
cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug | ||
cmake --build build_linux | ||
- 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 | ||
build-on-ubuntu2004: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
RUNS_ON: ubuntu2004 | ||
GH_WORKSPACE: /home/runner/work/wex/wex #= $GITHUB_WORKSPACE | ||
build-on-ubuntu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup cmake | ||
uses: jwlawson/[email protected] | ||
|