diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 77b3be4..90dca61 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,4 +1,4 @@ -name: C/C++ CI +name: Linux concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true @@ -35,7 +35,7 @@ jobs: python3-dev - name: Meson setup - run: meson setup _build -Db_sanitize=address,undefined + run: CFLAGS="-Werror" meson setup _build -Db_sanitize=address,undefined - name: Build run: meson compile -C _build @@ -45,7 +45,8 @@ jobs: cd _build meson test -v - - name: Test swig + - name: Test swig build run: | - meson setup _build --reconfigure -Dswig_lang=python + rm -rf _build + meson setup _build -Dswig_lang=python meson compile -C _build diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..e31dc27 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,41 @@ +name: MacOS +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +on: + push: + branches: [ master ] + paths: + - '**' + - '!**.yml' + - '!**.md' + - '**/macos.yml' + + pull_request: + branches: [ master ] + paths: + - '**' + - '!**.yml' + - '!**.md' + - '**/macos.yml' + +jobs: + MacOS: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Install Dependencies + run: | + brew update + brew install \ + meson + + - name: Meson setup + run: CFLAGS="-Werror" meson setup _build -Db_sanitize=address,undefined + + - name: Build + run: meson compile -C _build + + - name: Test + run: meson test -v -C _build diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d3a9be1..2e3887c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -37,7 +37,7 @@ jobs: - name: Meson setup shell: msys2 {0} run: | - meson setup _build + CFLAGS="-Werror" meson setup _build - name: Build shell: msys2 {0} diff --git a/README.md b/README.md index 894f17f..34f872f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![Linux](https://github.com/theimpossibleastronaut/deckhandler/actions/workflows/linux.yml/badge.svg)](https://github.com/theimpossibleastronaut/deckhandler/actions/workflows/linux.yml) [![Windows](https://github.com/theimpossibleastronaut/deckhandler/actions/workflows/windows.yml/badge.svg)](https://github.com/theimpossibleastronaut/deckhandler/actions/workflows/windows.yml) +[![MacOS](https://github.com/Dealer-s-Choice/deckhandler/actions/workflows/macos.yml/badge.svg)](https://github.com/Dealer-s-Choice/deckhandler/actions/workflows/macos.yml) # deckhandler Library that will create a deck of cards and shuffle it. diff --git a/subprojects/pcg/pcg_basic.c b/subprojects/pcg/pcg_basic.c index 8c2fd0d..1a2972e 100644 --- a/subprojects/pcg/pcg_basic.c +++ b/subprojects/pcg/pcg_basic.c @@ -66,7 +66,7 @@ uint32_t pcg32_random_r(pcg32_random_t* rng) return (xorshifted >> rot) | (xorshifted << ((-rot) & 31)); } -uint32_t pcg32_random() +uint32_t pcg32_random(void) { return pcg32_random_r(&pcg32_global); } @@ -98,7 +98,7 @@ uint32_t pcg32_boundedrand_r(pcg32_random_t* rng, uint32_t bound) // should usually terminate quickly; on average (assuming all bounds are // equally likely), 82.25% of the time, we can expect it to require just // one iteration. In the worst case, someone passes a bound of 2^31 + 1 - // (i.e., 2147483649), which invalidates almost 50% of the range. In + // (i.e., 2147483649), which invalidates almost 50% of the range. In // practice, bounds are typically small and only a tiny amount of the range // is eliminated. for (;;) {