Skip to content

Commit b2e8dff

Browse files
committed
Update Pipeline
1 parent ed85b0c commit b2e8dff

1 file changed

Lines changed: 3 additions & 269 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 269 deletions
Original file line numberDiff line numberDiff line change
@@ -23,53 +23,7 @@ env:
2323
MAKEJOBS: '-j10'
2424

2525
jobs:
26-
test-each-commit:
27-
name: 'test each commit'
28-
runs-on: ubuntu-22.04
29-
if: false # Temporarily disabled
30-
timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes. Assuming a worst case time of 1 hour per commit, this leads to a --max-count=6 below.
31-
env:
32-
MAX_COUNT: 6
33-
steps:
34-
- name: Determine fetch depth
35-
run: echo "FETCH_DEPTH=$((${{ github.event.pull_request.commits }} + 2))" >> "$GITHUB_ENV"
36-
- uses: actions/checkout@v4
37-
with:
38-
ref: ${{ github.event.pull_request.head.sha }}
39-
fetch-depth: ${{ env.FETCH_DEPTH }}
40-
- name: Determine commit range
41-
run: |
42-
# Checkout HEAD~ and find the test base commit
43-
# Checkout HEAD~ because it would be wasteful to rerun tests on the PR
44-
# head commit that are already run by other jobs.
45-
git checkout HEAD~
46-
# Figure out test base commit by listing ancestors of HEAD, excluding
47-
# ancestors of the most recent merge commit, limiting the list to the
48-
# newest MAX_COUNT ancestors, ordering it from oldest to newest, and
49-
# taking the first one.
50-
#
51-
# If the branch contains up to MAX_COUNT ancestor commits after the
52-
# most recent merge commit, all of those commits will be tested. If it
53-
# contains more, only the most recent MAX_COUNT commits will be
54-
# tested.
55-
#
56-
# In the command below, the ^@ suffix is used to refer to all parents
57-
# of the merge commit as described in:
58-
# https://git-scm.com/docs/git-rev-parse#_other_rev_parent_shorthand_notations
59-
# and the ^ prefix is used to exclude these parents and all their
60-
# ancestors from the rev-list output as described in:
61-
# https://git-scm.com/docs/git-rev-list
62-
echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD ^$(git rev-list -n1 --merges HEAD)^@ | head -1)" >> "$GITHUB_ENV"
63-
- run: |
64-
sudo apt-get update
65-
sudo apt-get install clang ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y
66-
- name: Compile and run tests
67-
run: |
68-
# Run tests on commits after the last merge commit and before the PR head commit
69-
# Use clang++, because it is a bit faster and uses less memory than g++
70-
git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && ./autogen.sh && CC=clang CXX=clang++ ./configure && make clean && make -j $(nproc) check && ./test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }}
71-
72-
macos-native-x86_64:
26+
macos-native-x86_64:
7327
name: 'macOS 13 native, x86_64, Qt GUI, with depends, unit tests, functional tests'
7428
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
7529
# See: https://github.com/actions/runner-images#available-images.
@@ -106,7 +60,7 @@ jobs:
10660
run: |
10761
# A workaround for "The `brew link` step did not complete successfully" error.
10862
brew install python@3 || brew link --overwrite python@3
109-
brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode
63+
brew install autoconf automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode
11064
11165
- name: Set Ccache directory
11266
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
@@ -225,7 +179,7 @@ jobs:
225179
run: |
226180
# A workaround for "The `brew link` step did not complete successfully" error.
227181
brew install python@3 || brew link --overwrite python@3
228-
brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode
182+
brew install autoconf automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode
229183
230184
- name: Set Ccache directory
231185
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
@@ -309,226 +263,6 @@ jobs:
309263
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
310264
key: ${{ github.job }}-ccache-${{ github.run_id }}
311265

312-
win64-native:
313-
name: 'Win64 native, VS 2022, Qt GUI, unit tests, functional tests'
314-
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
315-
# See: https://github.com/actions/runner-images#available-images.
316-
runs-on: windows-2022
317-
318-
# Temporarily disabled
319-
if: false
320-
321-
env:
322-
CCACHE_MAXSIZE: '200M'
323-
CI_CCACHE_VERSION: '4.7.5'
324-
CI_QT_CONF: '-release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml'
325-
CI_QT_DIR: 'qt-everywhere-src-5.15.10'
326-
CI_QT_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.zip'
327-
PYTHONUTF8: 1
328-
TEST_RUNNER_TIMEOUT_FACTOR: 40
329-
330-
steps:
331-
- name: Checkout
332-
uses: actions/checkout@v4
333-
334-
- name: Fix Visual Studio installation
335-
# Avoid toolset ambiguity that MSVC can't handle.
336-
run: |
337-
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
338-
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
339-
$componentsToRemove= @(
340-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM.Spectre"
341-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM"
342-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM64.Spectre"
343-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM64"
344-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM.Spectre"
345-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM"
346-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM64.Spectre"
347-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM64"
348-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.Spectre"
349-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL"
350-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM.Spectre"
351-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM"
352-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM64.Spectre"
353-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM64"
354-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.Spectre"
355-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC"
356-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.x86.x64.Spectre"
357-
"Microsoft.VisualStudio.Component.VC.14.37.17.7.x86.x64"
358-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM"
359-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM.Spectre"
360-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM64"
361-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM64.Spectre"
362-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL"
363-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM"
364-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM.Spectre"
365-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM64"
366-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM64.Spectre"
367-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.Spectre"
368-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC"
369-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM"
370-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM.Spectre"
371-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM64"
372-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM64.Spectre"
373-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.Spectre"
374-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.x86.x64"
375-
"Microsoft.VisualStudio.Component.VC.14.38.17.8.x86.x64.Spectre"
376-
)
377-
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_}
378-
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
379-
# should be run twice
380-
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
381-
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
382-
383-
- name: Configure Developer Command Prompt for Microsoft Visual C++
384-
# Using microsoft/setup-msbuild is not enough.
385-
uses: ilammy/msvc-dev-cmd@v1
386-
with:
387-
arch: x64
388-
389-
- name: Check MSBuild and Qt
390-
run: |
391-
msbuild -version | Out-File -FilePath "$env:GITHUB_WORKSPACE\msbuild_version"
392-
Get-Content -Path "$env:GITHUB_WORKSPACE\msbuild_version"
393-
$env:CI_QT_URL | Out-File -FilePath "$env:GITHUB_WORKSPACE\qt_url"
394-
$env:CI_QT_CONF | Out-File -FilePath "$env:GITHUB_WORKSPACE\qt_conf"
395-
396-
- name: Restore static Qt cache
397-
id: static-qt-cache
398-
uses: actions/cache/restore@v3
399-
with:
400-
path: C:\Qt_static
401-
key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }}
402-
403-
- name: Build static Qt. Download
404-
if: steps.static-qt-cache.outputs.cache-hit != 'true'
405-
shell: cmd
406-
run: |
407-
curl --location --output C:\qt-src.zip %CI_QT_URL%
408-
choco install --yes --no-progress jom
409-
410-
- name: Build static Qt. Expand source archive
411-
if: steps.static-qt-cache.outputs.cache-hit != 'true'
412-
shell: cmd
413-
run: tar -xf C:\qt-src.zip -C C:\
414-
415-
- name: Build static Qt. Create build directory
416-
if: steps.static-qt-cache.outputs.cache-hit != 'true'
417-
run: |
418-
Rename-Item -Path "C:\$env:CI_QT_DIR" -NewName "C:\qt-src"
419-
New-Item -ItemType Directory -Path "C:\qt-src\build"
420-
421-
- name: Build static Qt. Configure
422-
if: steps.static-qt-cache.outputs.cache-hit != 'true'
423-
working-directory: C:\qt-src\build
424-
shell: cmd
425-
run: ..\configure %CI_QT_CONF% -prefix C:\Qt_static
426-
427-
- name: Build static Qt. Build
428-
if: steps.static-qt-cache.outputs.cache-hit != 'true'
429-
working-directory: C:\qt-src\build
430-
shell: cmd
431-
run: jom
432-
433-
- name: Build static Qt. Install
434-
if: steps.static-qt-cache.outputs.cache-hit != 'true'
435-
working-directory: C:\qt-src\build
436-
shell: cmd
437-
run: jom install
438-
439-
- name: Save static Qt cache
440-
if: steps.static-qt-cache.outputs.cache-hit != 'true'
441-
uses: actions/cache/save@v3
442-
with:
443-
path: C:\Qt_static
444-
key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }}
445-
446-
- name: Ccache installation cache
447-
id: ccache-installation-cache
448-
uses: actions/cache@v3
449-
with:
450-
path: |
451-
C:\ProgramData\chocolatey\lib\ccache
452-
C:\ProgramData\chocolatey\bin\ccache.exe
453-
C:\ccache\cl.exe
454-
key: ${{ github.job }}-ccache-installation-${{ env.CI_CCACHE_VERSION }}
455-
456-
- name: Install Ccache
457-
if: steps.ccache-installation-cache.outputs.cache-hit != 'true'
458-
run: |
459-
choco install --yes --no-progress ccache --version=$env:CI_CCACHE_VERSION
460-
New-Item -ItemType Directory -Path "C:\ccache"
461-
Copy-Item -Path "$env:ChocolateyInstall\lib\ccache\tools\ccache-$env:CI_CCACHE_VERSION-windows-x86_64\ccache.exe" -Destination "C:\ccache\cl.exe"
462-
463-
- name: Restore Ccache cache
464-
id: ccache-cache
465-
uses: actions/cache/restore@v3
466-
with:
467-
path: ~/AppData/Local/ccache
468-
key: ${{ github.job }}-ccache-${{ github.run_id }}
469-
restore-keys: ${{ github.job }}-ccache-
470-
471-
- name: Using vcpkg with MSBuild
472-
run: |
473-
Set-Location "$env:VCPKG_INSTALLATION_ROOT"
474-
Add-Content -Path "triplets\x64-windows-static.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
475-
vcpkg --vcpkg-root "$env:VCPKG_INSTALLATION_ROOT" integrate install
476-
git rev-parse HEAD | Out-File -FilePath "$env:GITHUB_WORKSPACE\vcpkg_commit"
477-
Get-Content -Path "$env:GITHUB_WORKSPACE\vcpkg_commit"
478-
479-
- name: vcpkg tools cache
480-
uses: actions/cache@v3
481-
with:
482-
path: C:/vcpkg/downloads/tools
483-
key: ${{ github.job }}-vcpkg-tools
484-
485-
- name: vcpkg binary cache
486-
uses: actions/cache@v3
487-
with:
488-
path: ~/AppData/Local/vcpkg/archives
489-
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('vcpkg_commit', 'msbuild_version', 'build_msvc/vcpkg.json') }}
490-
491-
- name: Generate project files
492-
run: py -3 build_msvc\msvc-autogen.py
493-
494-
- name: Build
495-
shell: cmd
496-
run: |
497-
ccache --zero-stats
498-
msbuild build_msvc\digibyte.sln -property:CLToolPath=C:\ccache;CLToolExe=cl.exe;UseMultiToolTask=true;Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
499-
500-
- name: Ccache stats
501-
run: ccache --show-stats
502-
503-
- name: Save Ccache cache
504-
uses: actions/cache/save@v3
505-
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
506-
with:
507-
path: ~/AppData/Local/ccache
508-
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
509-
key: ${{ github.job }}-ccache-${{ github.run_id }}
510-
511-
- name: Run unit tests
512-
run: src\test_digibyte.exe -l test_suite
513-
514-
- name: Run benchmarks
515-
run: src\bench_digibyte.exe -sanity-check
516-
517-
- name: Run util tests
518-
run: py -3 test\util\test_runner.py
519-
520-
- name: Run rpcauth test
521-
run: py -3 test\util\rpcauth-test.py
522-
523-
- name: Run functional tests
524-
# Don't run functional tests for pull requests.
525-
# The test suit regularly fails to complete in windows native github
526-
# actions as a child process stops making progress. The root cause has
527-
# not yet been determined.
528-
# Discussed in https://github.com/digibyte/digibyte/pull/28509
529-
if: github.event_name != 'pull_request'
530-
run: py -3 test\functional\test_runner.py --jobs $env:NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix=$env:RUNNER_TEMP --combinedlogslen=99999999 --timeout-factor=$env:TEST_RUNNER_TIMEOUT_FACTOR --extended
531-
532266
linux-native:
533267
name: 'Ubuntu 22.04 native, Qt GUI, with depends, unit tests, functional tests'
534268
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)