Skip to content

Commit

Permalink
Update deprecated Ubuntu GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanzou committed Apr 4, 2023
1 parent 876049f commit 9881ae7
Showing 1 changed file with 2 additions and 107 deletions.
109 changes: 2 additions & 107 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/actions-setup-cmake@v1.12
with:
cmake-version: '3.24.x'
- name: Test cmake version
run: cmake --version
- name: Install OS dependencies
run: |
sudo apt-get update --fix-missing
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/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: 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/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
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/actions-setup-cmake@v1.12
Expand Down

0 comments on commit 9881ae7

Please sign in to comment.