|
5 | 5 | pull_request: |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - build-on-ubuntu1804: |
9 | | - runs-on: ubuntu-18.04 |
10 | | - env: |
11 | | - RUNS_ON: ubuntu1804 |
12 | | - GH_WORKSPACE: /home/runner/work/wex/wex #= $GITHUB_WORKSPACE |
| 8 | + build-on-ubuntu: |
| 9 | + runs-on: ubuntu-latest |
13 | 10 | steps: |
14 | 11 | - name: Setup cmake |
15 | 12 | uses: jwlawson/actions-setup-cmake@v1.12 |
|
19 | 16 | run: cmake --version |
20 | 17 | - name: Install OS dependencies |
21 | 18 | run: | |
22 | | - sudo apt-get update |
| 19 | + sudo apt-get update --fix-missing |
23 | 20 | sudo apt-get install -y \ |
24 | 21 | build-essential \ |
25 | 22 | freeglut3-dev \ |
@@ -64,92 +61,32 @@ jobs: |
64 | 61 | cd $GITHUB_WORKSPACE/lk |
65 | 62 | cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug |
66 | 63 | cmake --build build_linux -- -j |
67 | | - - name: Set LKDIR and LKD_LIB envs |
| 64 | + - name: Set LKDIR |
68 | 65 | run: | |
69 | 66 | echo "LKDIR=$GITHUB_WORKSPACE/lk" >>$GITHUB_ENV |
70 | | - echo "LKD_LIB=$GITHUB_WORKSPACE/lk/build_linux" >>$GITHUB_ENV # iff CMAKE_BUILD_TYPE=Debug |
71 | | -
|
72 | | - - name: Checkout |
73 | | - uses: actions/checkout@v2 |
74 | | - with: |
75 | | - path: wex |
76 | | - - name: Build WEX |
| 67 | + - name: Set LKD_LIB |
77 | 68 | run: | |
78 | | - cd $GITHUB_WORKSPACE/wex |
79 | | - cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug |
80 | | - cmake --build build_linux |
81 | | - - name: Save static lib, Dview & wexsandbox |
82 | | - uses: actions/upload-artifact@v2 |
83 | | - with: |
84 | | - name: WEX-${{ env.RUNS_ON }}-x86_64 |
85 | | - path: | |
86 | | - ${{ env.GH_WORKSPACE }}/wex/build_linux/tools/DView* |
87 | | - ${{ env.GH_WORKSPACE }}/wex/build_linux/tools/wexsandbox* |
88 | | - ${{ env.GH_WORKSPACE }}/wex/build_linux/wex*.a |
89 | | -
|
90 | | - build-on-ubuntu2004: |
91 | | - runs-on: ubuntu-20.04 |
92 | | - env: |
93 | | - RUNS_ON: ubuntu2004 |
94 | | - GH_WORKSPACE: /home/runner/work/wex/wex #= $GITHUB_WORKSPACE |
95 | | - steps: |
96 | | - - name: Setup cmake |
97 | | - uses: jwlawson/actions-setup-cmake@v1.12 |
98 | | - with: |
99 | | - cmake-version: '3.24.x' |
100 | | - - name: Test cmake version |
101 | | - run: cmake --version |
102 | | - - name: Install OS dependencies |
| 69 | + echo "LKD_LIB=$GITHUB_WORKSPACE/lk/build_linux" >>$GITHUB_ENV |
| 70 | + - name: Set RAPIDJSONDIR |
103 | 71 | run: | |
104 | | - sudo apt-get update |
105 | | - sudo apt-get install -y \ |
106 | | - build-essential \ |
107 | | - freeglut3-dev \ |
108 | | - g++ \ |
109 | | - libcurl4-openssl-dev \ |
110 | | - libfontconfig-dev \ |
111 | | - libgl1-mesa-dev \ |
112 | | - libgtk2.0-dev \ |
113 | | - mesa-common-dev \ |
114 | | - unzip |
115 | | - - name: Get GCC version |
116 | | - run: gcc --version |
117 | | - - name: Get libc version |
118 | | - run: ldd --version |
119 | | - |
120 | | - - name: Install wxWidgets |
| 72 | + echo "RAPIDJSONDIR=$GITHUB_WORKSPACE/ssc" >>$GITHUB_ENV |
| 73 | + - name: Get git ref of sibling dependency SSC |
121 | 74 | run: | |
122 | | - sudo apt-get install -y libwxgtk*-dev |
123 | | - sudo ln -s $(which wx-config) /usr/local/bin/wx-config-3 |
124 | | - wx-config-3 --cflags | grep I |
125 | | -
|
126 | | - - name: Get git ref of sibling dependency LK |
127 | | - run: | |
128 | | - ref=$(git ls-remote --exit-code git://github.com/NREL/lk.git refs/heads/develop | awk '{print $1}') |
129 | | - echo "ref_of_lk=$ref" | tee --append $GITHUB_ENV |
130 | | - - name: Get cached build data of sibling dependency LK |
| 75 | + ref=$(git ls-remote --exit-code git://github.com/NREL/ssc.git refs/heads/develop | awk '{print $1}') |
| 76 | + echo "ref_of_ssc=$ref" | tee --append $GITHUB_ENV |
| 77 | + - name: Get cached build data of sibling dependency SSC |
131 | 78 | uses: actions/cache@v2 |
132 | | - id: cachedlk |
| 79 | + id: cachedssc |
133 | 80 | with: |
134 | | - path: ${{ env.GH_WORKSPACE }}/lk |
135 | | - key: ${{ env.RUNS_ON }}-${{ env.ref_of_lk }}-LK |
136 | | - - name: Clone sibling dependency LK |
137 | | - if: steps.cachedlk.outputs.cache-hit != 'true' |
| 81 | + path: ${{ env.GH_WORKSPACE }}/ssc |
| 82 | + key: ${{ env.RUNS_ON }}-${{ env.ref_of_ssc }}-SSC |
| 83 | + - name: Clone sibling dependency SSC |
| 84 | + if: steps.cachedssc.outputs.cache-hit != 'true' |
138 | 85 | uses: actions/checkout@v2 |
139 | 86 | with: |
140 | | - ref: ${{ env.ref_of_lk }} |
141 | | - path: lk |
142 | | - repository: NREL/lk |
143 | | - - name: Build LK |
144 | | - if: steps.cachedlk.outputs.cache-hit != 'true' |
145 | | - run: | |
146 | | - cd $GITHUB_WORKSPACE/lk |
147 | | - cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug |
148 | | - cmake --build build_linux -- -j |
149 | | - - name: Set LKDIR and LKD_LIB envs |
150 | | - run: | |
151 | | - echo "LKDIR=$GITHUB_WORKSPACE/lk" >>$GITHUB_ENV |
152 | | - echo "LKD_LIB=$GITHUB_WORKSPACE/lk/build_linux" >>$GITHUB_ENV # iff CMAKE_BUILD_TYPE=Debug |
| 87 | + ref: ${{ env.ref_of_ssc }} |
| 88 | + path: ssc |
| 89 | + repository: NREL/ssc |
153 | 90 |
|
154 | 91 | - name: Checkout |
155 | 92 | uses: actions/checkout@v2 |
|
0 commit comments