Skip to content

Commit f9d4cb6

Browse files
committed
run windows/macos pipeline on selfhosted runners
1 parent 775a314 commit f9d4cb6

File tree

6 files changed

+70
-100
lines changed

6 files changed

+70
-100
lines changed

.github/workflows/clang-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
check:
7-
runs-on: self-built-ubuntu
7+
runs-on: rippled-runner
88
env:
99
CLANG_VERSION: 10
1010
steps:

.github/workflows/levelization.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
check:
7-
runs-on: self-built-ubuntu
7+
runs-on: rippled-runner
88
env:
99
CLANG_VERSION: 10
1010
steps:

.github/workflows/linux-general.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# though a failed build will not push a cache.
3333
# The one downside is different prerequisites are installed on different
3434
# docker images, so there will be one cache per image.
35-
runs-on: self-built-ubuntu
35+
runs-on: rippled-runner-dind
3636
timeout-minutes: 720
3737
if: ${{ !contains(github.event.head_commit.message, 'ci_run_') || contains(github.event.head_commit.message, 'ci_run_linux') }}
3838
strategy:
@@ -189,7 +189,7 @@ jobs:
189189
linux_everything_else:
190190
name: Linux ${{ matrix.compiler.CC }}, ${{ matrix.BUILD_TYPE }}, unity ${{ matrix.unity }}, ${{ matrix.name }}
191191
needs: linux_cache
192-
runs-on: self-built-ubuntu
192+
runs-on: rippled-runner-dind
193193
timeout-minutes: 720
194194
strategy:
195195
fail-fast: false

.github/workflows/macos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ env:
2929
jobs:
3030
macos_cache:
3131
name: Seed MacOS dependencies
32-
runs-on: "macos-latest"
32+
runs-on: "mac-runner"
3333
timeout-minutes: 720
3434
if: ${{ !contains(github.event.head_commit.message, 'ci_run_') || contains(github.event.head_commit.message, 'ci_run_mac') }}
3535
outputs:
@@ -240,7 +240,7 @@ jobs:
240240
# and the jobs appear to be pretty reliable so far.
241241
name: MacOS ${{ matrix.build.BLD_CONFIG }}
242242
needs: macos_cache
243-
runs-on: "macos-latest"
243+
runs-on: "mac-runner"
244244
timeout-minutes: 720
245245
strategy:
246246
fail-fast: false
@@ -399,7 +399,7 @@ jobs:
399399
# Can't access env in the name, so hard code
400400
name: MacOS IPv6 test runner Debug
401401
needs: [ macos_cache, macos ]
402-
runs-on: "macos-latest"
402+
runs-on: "mac-runner"
403403
timeout-minutes: 720
404404
strategy:
405405
fail-fast: false

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "test"
2+
on: [push, pull_request]
3+
4+
jobs:
5+
windows_cache:
6+
name: Seed windows cache
7+
runs-on: windows-runner
8+
timeout-minutes: 720
9+
steps:
10+
- name: Bash
11+
shell: bash -leo pipefail {0}
12+
run: |
13+
echo "PATH: $PATH"
14+
whoami
15+
cmake --version

.github/workflows/windows.yml

Lines changed: 48 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
# Alternate download location
1414
BOOST_URL2: 'https://downloads.sourceforge.net/project/boost/boost/1.75.0/boost_1_75_0.tar.bz2?r=&ts=1594393912&use_mirror=newcontinuum'
1515
BOOST_CACHE_DIR: ${{ github.workspace }}\_boost_cache
16-
BOOST_ROOT: ${{ github.workspace }}\_boost_cache\boost_1_75_0
16+
BOOST_ROOT: C:\lib\boost_1_75_0
1717
CMAKE_BOOST: |
1818
-DCMAKE_PREFIX_PATH=${BOOST_ROOT}\\_INSTALLED_
1919
-DBOOST_ROOT=${BOOST_ROOT}\\_INSTALLED_
@@ -40,7 +40,7 @@ env:
4040
jobs:
4141
windows_cache:
4242
name: Seed windows cache
43-
runs-on: windows-2019
43+
runs-on: windows-runner
4444
timeout-minutes: 720
4545
if: ${{ !contains(github.event.head_commit.message, 'ci_run_') || contains(github.event.head_commit.message, 'ci_run_win') }}
4646
outputs:
@@ -70,8 +70,9 @@ jobs:
7070

7171
- name: Build parameters
7272
id: cachekeys
73-
shell: bash
73+
shell: bash -leo pipefail {0}
7474
run: |
75+
export PATH=${PATH}:/c/vcpkg
7576
echo "::set-output name=cmakeconfig::${{ hashfiles(
7677
'rippled/CMakeFiles.txt', 'rippled/Builds/CMake/**',
7778
'rippled/.github/**/cache-invalidate.txt') }}"
@@ -99,12 +100,12 @@ jobs:
99100
restore-keys: |
100101
${{ runner.os }}-nihsrc-${{ steps.cachekeys.outputs.cmakeconfig }}-
101102
102-
- name: Boost cache
103-
id: boostcache
104-
uses: actions/cache@v2
105-
with:
106-
path: ${{ env.BOOST_CACHE_DIR }}
107-
key: ${{ runner.os }}-boost-${{ env.BOOST_ROOT }}
103+
# - name: Boost cache
104+
# id: boostcache
105+
# uses: actions/cache@v2
106+
# with:
107+
# path: ${{ env.BOOST_CACHE_DIR }}
108+
# key: ${{ runner.os }}-boost-${{ env.BOOST_ROOT }}
108109

109110
- name: Vcpkg cache
110111
id: vcpkgcache
@@ -118,7 +119,7 @@ jobs:
118119
119120
- name: Boost parameters
120121
id: boostkeys
121-
shell: bash
122+
shell: bash -leo pipefail {0}
122123
run: |
123124
boost_file_win="${BOOST_CACHE_DIR}\boost.tar.bz2"
124125
boost_file=$( cygpath --unix "${boost_file_win}" )
@@ -131,7 +132,7 @@ jobs:
131132
echo "::set-output name=download_boost_file::${download_boost_file}"
132133
133134
- name: Dump environment
134-
shell: bash
135+
shell: bash -leo pipefail {0}
135136
run: |
136137
env
137138
set | grep =
@@ -140,39 +141,40 @@ jobs:
140141
time find /c/Program\ Files\ \(x86\)/ -iname 'cl.exe' || true
141142
142143
- name: Setup cache folders
143-
shell: bash
144+
shell: bash -leo pipefail {0}
144145
env:
145146
NUM_PROCESSORS: ${{ steps.cachekeys.outputs.NUM_PROCESSORS }}
146147
run: |
147148
mkdir -pv ${CACHE_DIR} ${NIH_CACHE_ROOT} ${BOOST_CACHE_DIR} \
148149
${VCPKG_CACHE_DIR} ${NIH_SRC_PATH}
149150
150-
- name: Download Boost
151-
# Do this step early so that if the download fails, the job fails fast
152-
if: ${{ steps.boostkeys.outputs.download_boost_file == 'true' }}
153-
# Powershell
154-
shell: pwsh
155-
run: |
156-
$Client = New-Object System.Net.WebClient
157-
$Dest = "${{ steps.boostkeys.outputs.boost_file_win }}"
158-
try {
159-
$Url = "$env:BOOST_URL"
160-
"Attempting to download $Url to $Dest"
161-
$Client.DownloadFile($Url, $Dest)
162-
ls "$Dest"
163-
}
164-
catch {
165-
$Url = "$env:BOOST_URL2"
166-
"Attempting to download $Url to $Dest"
167-
$Client.DownloadFile($Url, $Dest)
168-
ls "$Dest"
169-
}
151+
# - name: Download Boost
152+
# # Do this step early so that if the download fails, the job fails fast
153+
# if: ${{ steps.boostkeys.outputs.download_boost_file == 'true' }}
154+
# # Powershell
155+
# shell: powershell
156+
# run: |
157+
# $Client = New-Object System.Net.WebClient
158+
# $Dest = "${{ steps.boostkeys.outputs.boost_file_win }}"
159+
# try {
160+
# $Url = "$env:BOOST_URL"
161+
# "Attempting to download $Url to $Dest"
162+
# $Client.DownloadFile($Url, $Dest)
163+
# ls "$Dest"
164+
# }
165+
# catch {
166+
# $Url = "$env:BOOST_URL2"
167+
# "Attempting to download $Url to $Dest"
168+
# $Client.DownloadFile($Url, $Dest)
169+
# ls "$Dest"
170+
# }
170171
- name: Initialize vcpkg cache
171172
if: steps.vcpkgcache.outputs.cache-hit != 'true'
172-
shell: bash
173+
shell: bash -leo pipefail {0}
173174
env:
174175
NUM_PROCESSORS: ${{ steps.cachekeys.outputs.NUM_PROCESSORS }}
175176
run: |
177+
export PATH=${PATH}:/c/vcpkg
176178
[[ "${verbose}" == "true" ]] && set -x || true
177179
178180
find ${VCPKG_DIR} -maxdepth 1 -type d -exec du -sh {} \; || true
@@ -227,7 +229,7 @@ jobs:
227229
228230
- name: Build Boost
229231
if: steps.boostcache.outputs.cache-hit != 'true'
230-
shell: bash
232+
shell: bash -leo pipefail {0}
231233
env:
232234
NUM_PROCESSORS: ${{ steps.cachekeys.outputs.NUM_PROCESSORS }}
233235
BOOST_FILE: ${{ steps.boostkeys.outputs.boost_file }}
@@ -245,15 +247,14 @@ jobs:
245247
246248
- name: Download CMake dependencies
247249
if: steps.srccache.outputs.cache-hit != 'true'
248-
shell: bash
250+
shell: bash -leo pipefail {0}
249251
env:
250252
NUM_PROCESSORS: ${{ steps.cachekeys.outputs.NUM_PROCESSORS }}
251253
run: |
252254
if [[ "${verbose}" == "true" ]] ; then
253255
set -x
254256
choco list | wc
255257
fi
256-
. ${srcdir}/bin/sh/setup-msvc.sh ${!VCVersion}
257258
[[ "${verbose}" == "true" ]] && type -a ninja || true
258259
259260
# Download the NIH items
@@ -316,7 +317,6 @@ jobs:
316317
run: |
317318
du -sh ${VCPKG_DIR} || true
318319
du -sh ${VCPKG_CACHE_DIR} || true
319-
du -sh ${BOOST_CACHE_DIR} || true
320320
du -sh ${CACHE_DIR} || true
321321
cd ${CACHE_DIR}
322322
du -sh * || true
@@ -325,7 +325,7 @@ jobs:
325325
326326
- name: Debug output
327327
if: steps.srccache.outputs.cache-hit != 'true'
328-
shell: bash
328+
shell: bash -leo pipefail {0}
329329
continue-on-error: true
330330
run: |
331331
time df -h
@@ -348,12 +348,13 @@ jobs:
348348
windows_everything_else:
349349
name: Windows ${{ matrix.VCVersion }}, ${{ matrix.build.type }}, ${{ matrix.cmake.CMAKE_GENERATOR }} ${{ matrix.note }} unity=${{ matrix.cmake.unity }}
350350
needs: windows_cache
351-
runs-on: windows-2019
351+
runs-on: windows-runner-${{ matrix.VCVersion }}
352352
timeout-minutes: 720
353353
strategy:
354354
fail-fast: false
355355
matrix:
356356
VCVersion: [ 'VC2017', 'VC2019' ]
357+
# VCVersion: [ 'VC2019' ]
357358
build:
358359
- # Debug builds have some tests that seem to make the Github
359360
# hosts run out of resources. Skip those tests and run them
@@ -445,11 +446,11 @@ jobs:
445446
path: ${{ env.NIH_SRC_PATH}}
446447
key: ${{ runner.os }}-nihsrc-${{ needs.windows_cache.outputs.cmakeconfig }}-${{ needs.windows_cache.outputs.instructions }}
447448

448-
- name: Boost cache
449-
uses: actions/cache@v2
450-
with:
451-
path: ${{ env.BOOST_CACHE_DIR }}
452-
key: ${{ runner.os }}-boost-${{ env.BOOST_ROOT }}
449+
# - name: Boost cache
450+
# uses: actions/cache@v2
451+
# with:
452+
# path: ${{ env.BOOST_CACHE_DIR }}
453+
# key: ${{ runner.os }}-boost-${{ env.BOOST_ROOT }}
453454

454455
- name: Vcpkg cache
455456
id: vcpkgcache
@@ -459,49 +460,13 @@ jobs:
459460
key: ${{ runner.os }}-vcpkg-${{ needs.windows_cache.outputs.vcpkgver }}-${{ needs.windows_cache.outputs.instructions }}
460461

461462
- name: Dump environment
462-
shell: bash
463+
shell: bash -leo pipefail {0}
463464
run: |
464465
env
465466
set | grep =
466467
467-
- name: Disk space before
468-
shell: bash
469-
run: |
470-
df -h
471-
du -sh ${VCPKG_CACHE_DIR} || true
472-
du -sh ${BOOST_CACHE_DIR} || true
473-
find ${CACHE_DIR} ${NIH_SRC_PATH} ${NIH_CACHE_ROOT} -maxdepth 2 \
474-
-type d -exec du -sh {} \; || true
475-
476-
- name: Get vcpkg libs from cache
477-
shell: bash
478-
run: |
479-
[[ "${verbose}" == "true" ]] && set -x || true
480-
481-
if [[ -d ${VCPKG_CACHE_DIR} ]]
482-
then
483-
pushd ${VCPKG_CACHE_DIR}
484-
mv -u * ${VCPKG_DIR}/
485-
popd
486-
fi
487-
488-
. ${srcdir}/bin/sh/setup-msvc.sh ${!VCVersion}
489-
if [[ "${verbose}" == "true" ]] ; then
490-
type -a cl.exe || true
491-
type -a vcpkg
492-
ls -l ${VCPKG_DIR}
493-
fi
494-
495-
mkdir -pv ${VCPKG_DIR}/installed
496-
497-
df -h
498-
# Don't install dependencies. If they're not in the cache,
499-
# the build should fail
500-
# Make sure we can see the installed packages
501-
${srcdir}/bin/sh/install-vcpkg.sh
502-
503468
- name: Build
504-
shell: bash
469+
shell: bash -leo pipefail {0}
505470
run: |
506471
[[ "${verbose}" == "true" ]] && set -x || true
507472
df -h
@@ -533,7 +498,7 @@ jobs:
533498
# that causes tests to fail. Skip them unless the windows
534499
# tests are explicitly requested.
535500
if: ${{ ! matrix.skip_tests }}
536-
shell: bash
501+
shell: bash -leo pipefail {0}
537502
run: |
538503
[[ "${verbose}" == "true" ]] && set -x || true
539504
export RUNDIR="${builddir}"
@@ -568,16 +533,6 @@ jobs:
568533
run: |
569534
find ${builddir} -iname 'unity_*.cxx' -ls -exec cat {} \;
570535
571-
- name: Disk space after
572-
shell: bash
573-
if: always()
574-
run: |
575-
df -h
576-
du -sh ${VCPKG_CACHE_DIR} || true
577-
du -sh ${BOOST_CACHE_DIR} || true
578-
find ${CACHE_DIR} ${NIH_SRC_PATH} ${NIH_CACHE_ROOT} -maxdepth 2 \
579-
-type d -exec du -sh {} \; || true
580-
581536
- name: Debug output artifacts
582537
if: ${{ always() }}
583538
uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)