diff --git a/.github/update-wide-integer b/.github/update-wide-integer new file mode 100755 index 000000000..bd966e317 --- /dev/null +++ b/.github/update-wide-integer @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -euo pipefail + +SOURCE_FILE_PATH=$( + cd "$(dirname "$0")"/.. + pwd +)/include/cnl/_impl/ckormanyos/uintwide_t.h + +git clone https://github.com/ckormanyos/wide-integer/ + +echo "// NOLINTBEGIN(*)" > "${SOURCE_FILE_PATH}" +echo "// copied from https://github.com/ckormanyos/wide-integer/" >> "${SOURCE_FILE_PATH}" +echo "" >> "${SOURCE_FILE_PATH}" + +cat wide-integer/math/wide_integer/uintwide_t.h >> "${SOURCE_FILE_PATH}" + +echo "// NOLINTEND(*)" >> "${SOURCE_FILE_PATH}" diff --git a/.github/workflows/wide-integer.yml b/.github/workflows/wide-integer.yml new file mode 100644 index 000000000..a3f991eaf --- /dev/null +++ b/.github/workflows/wide-integer.yml @@ -0,0 +1,27 @@ +--- +name: pr + +on: + pull_request: + branches: + - '**' + push: + branches: + - main + +jobs: + # Check for updates to wide-integer library + wide-integer: + runs-on: ubuntu-18.04 + container: johnmcfarlane/cnl_ci:base-21.10 + steps: + - uses: actions/checkout@v2 + + - name: Extract wide-integer source + shell: bash + run: $GITHUB_WORKSPACE/.github/update-wide-integer + + - name: Check for changes + shell: bash + run: git diff --exit-code +...