mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
- PR #5228 added assert=TRUE and werr=TRUE CMake flags to the build/action.yml script which is used by all CI jobs to build rippled, ensuring those flags were always set. The assumption was that only the CI jobs used that script, so any extra time cost was offset by the benefit of the extra checks. That assumption was incorrect. That script is used by other downstream projects. Therefore, those flags have been moved into the individual CI jobs' "cmake-args" parameter passed to build/action.yml. This will have the same effect for CI jobs without any side effects.
98 lines
3.1 KiB
YAML
98 lines
3.1 KiB
YAML
name: windows
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
# If the branches list is ever changed, be sure to change it on all
|
|
# build/test jobs (nix, macos, windows, instrumentation)
|
|
branches:
|
|
# Always build the package branches
|
|
- develop
|
|
- release
|
|
- master
|
|
# Branches that opt-in to running
|
|
- 'ci/**'
|
|
|
|
# https://docs.github.com/en/actions/using-jobs/using-concurrency
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
|
|
test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
version:
|
|
- generator: Visual Studio 17 2022
|
|
runs-on: windows-2022
|
|
configuration:
|
|
- type: Release
|
|
tests: true
|
|
- type: Debug
|
|
# Skip running unit tests on debug builds, because they
|
|
# take an unreasonable amount of time
|
|
tests: false
|
|
runtime: d
|
|
runs-on: ${{ matrix.version.runs-on }}
|
|
env:
|
|
build_dir: .build
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
- name: choose Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.9
|
|
- name: learn Python cache directory
|
|
id: pip-cache
|
|
shell: bash
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
echo "dir=$(pip cache dir)" | tee ${GITHUB_OUTPUT}
|
|
- name: restore Python cache directory
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-${{ hashFiles('.github/workflows/windows.yml') }}
|
|
- name: install Conan
|
|
run: pip install wheel 'conan<2'
|
|
- name: check environment
|
|
run: |
|
|
dir env:
|
|
$env:PATH -split ';'
|
|
python --version
|
|
conan --version
|
|
cmake --version
|
|
- name: configure Conan
|
|
shell: bash
|
|
run: |
|
|
conan profile new default --detect
|
|
conan profile update settings.compiler.cppstd=20 default
|
|
conan profile update \
|
|
settings.compiler.runtime=MT${{ matrix.configuration.runtime }} \
|
|
default
|
|
- name: build dependencies
|
|
uses: ./.github/actions/dependencies
|
|
env:
|
|
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }}
|
|
CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }}
|
|
with:
|
|
configuration: ${{ matrix.configuration.type }}
|
|
- name: build
|
|
uses: ./.github/actions/build
|
|
with:
|
|
generator: '${{ matrix.version.generator }}'
|
|
configuration: ${{ matrix.configuration.type }}
|
|
# Hard code for now. Move to the matrix if varied options are needed
|
|
cmake-args: '-Dassert=TRUE -Dwerr=TRUE -Dreporting=OFF -Dunity=ON'
|
|
cmake-target: install
|
|
- name: test
|
|
shell: bash
|
|
if: ${{ matrix.configuration.tests }}
|
|
run: |
|
|
${build_dir}/${{ matrix.configuration.type }}/rippled --unittest \
|
|
--unittest-jobs $(nproc)
|