Skip to content

Commit

Permalink
Handling updating of uintwide_t.h
Browse files Browse the repository at this point in the history
- script to pull latest from ckormanyos/wide-integer
- test that latest has been pulled
  • Loading branch information
johnmcfarlane authored and John McFarlane committed Jan 8, 2022
1 parent 9c5ce5c commit e30d084
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/update-wide-integer
Original file line number Diff line number Diff line change
@@ -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}"
27 changes: 27 additions & 0 deletions .github/workflows/wide-integer.yml
Original file line number Diff line number Diff line change
@@ -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
...

0 comments on commit e30d084

Please sign in to comment.