-
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 #129 from NREL/develop
develop to master for 2021.12.02
- Loading branch information
Showing
21 changed files
with
709 additions
and
402 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 |
---|---|---|
@@ -0,0 +1,160 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
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: Install OS dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
build-essential \ | ||
cmake \ | ||
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/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 | ||
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: 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 | ||
steps: | ||
- name: Install OS dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
build-essential \ | ||
cmake \ | ||
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/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 | ||
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: 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 |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
extraction: | ||
cpp: | ||
prepare: | ||
packages: | ||
- g++ | ||
- libgtk2.0-dev | ||
- libgl1-mesa-dev | ||
- mesa-common-dev | ||
- freeglut3-dev | ||
- libcurl4-openssl-dev | ||
- libc6 | ||
|
||
after_prepare: | ||
- wget -q https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.1/wxWidgets-3.1.1.tar.bz2 -O $LGTM_WORKSPACE/wxWidgets-3.1.1.tar.bz2 | ||
- cd $LGTM_WORKSPACE | ||
- tar jxf wxWidgets-3.1.1.tar.bz2 | ||
- cd wxWidgets-3.1.1 | ||
- ./configure --prefix=$LGTM_WORKSPACE/wx-3.1.1 --enable-shared=no --enable-stl=yes --enable-debug=no --with-gtk=2 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --without-libjbig --without-liblzma --without-gtkprint --with-libnotify=no --with-libmspack=no --with-gnomevfs=no --with-opengl=yes --with-sdl=no --with-cxx=11 | ||
- make -j2 all install | ||
- export WXMSW3=$LGTM_WORKSPACE/wx-3.1.1 | ||
- (cd ../ && pwd) | ||
- export LKDIR=$LGTM_WORKSPACE/build/lk | ||
- export WEXDIR=$LGTM_SRC | ||
- git clone --depth=1 https://github.com/NREL/lk $LKDIR; | ||
- export PATH=$PATH:$HOME/wx-3.1.1/bin | ||
|
||
configure: | ||
command: | ||
- mkdir $LKDIR/build && cd $LKDIR/build && cmake .. -DCMAKE_BUILD_TYPE=Release && cmake --build . -j 4 --target lk | ||
- mkdir $WEXDIR/build && cd $WEXDIR/build && cmake .. -DCMAKE_BUILD_TYPE=Release | ||
index: | ||
build_command: | ||
cd $WEXDIR/build && make -j 4 | ||
|
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
Oops, something went wrong.