Skip to content

Commit c848010

Browse files
committed
Set up GitHub Actions CI and bump version to 1.0
1 parent 0fa5635 commit c848010

File tree

3 files changed

+66
-1
lines changed

3 files changed

+66
-1
lines changed

.github/workflows/ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
name: ${{ matrix.os }} / ${{ matrix.compiler }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- os: ubuntu-latest
18+
compiler: gcc
19+
cc: gcc
20+
cxx: g++
21+
- os: ubuntu-latest
22+
compiler: clang
23+
cc: clang
24+
cxx: clang++
25+
- os: windows-latest
26+
compiler: msvc
27+
- os: macos-latest
28+
compiler: apple-clang
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Configure CMake
34+
run: >
35+
cmake -B build
36+
-DPCG_CPP_BUILD_SAMPLES=ON
37+
-DPCG_CPP_BUILD_TESTS=ON
38+
-DCMAKE_BUILD_TYPE=Release
39+
env:
40+
CC: ${{ matrix.cc }}
41+
CXX: ${{ matrix.cxx }}
42+
43+
- name: Build
44+
run: cmake --build build --config Release
45+
46+
- name: Run CTest
47+
run: |
48+
cd build
49+
ctest -C Release --output-on-failure
50+
51+
- name: Run Scripted Tests (Linux/macOS)
52+
if: runner.os != 'Windows'
53+
run: |
54+
chmod +x ./test-high/run-tests.sh
55+
# run-tests.sh expects binaries in specific locations or build dir
56+
# Our updated run-tests.sh supports ../build/test-high
57+
./test-high/run-tests.sh
58+
59+
- name: Run Scripted Tests (Windows)
60+
if: runner.os == 'Windows'
61+
shell: pwsh
62+
run: |
63+
./test-high/run-tests.ps1

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.10)
2-
project(pcg-cpp VERSION 0.9.1 LANGUAGES CXX)
2+
project(pcg-cpp VERSION 1.0 LANGUAGES CXX)
33

44
include(GNUInstallDirs)
55
include(CMakePackageConfigHelpers)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# PCG Random Number Generation, C++ Edition
22

33
[![Maintenance Status](https://img.shields.io/badge/status-maintained-brightgreen.svg)](https://github.com/Total-Random/pcg-cpp)
4+
[![CI](https://github.com/Total-Random/pcg-cpp/actions/workflows/ci.yml/badge.svg)](https://github.com/Total-Random/pcg-cpp/actions/workflows/ci.yml)
45
[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](https://opensource.org/licenses/MIT)
6+
[![Version](https://img.shields.io/badge/version-1.0-blue.svg)](CMakeLists.txt)
57

68
[PCG-Random website]: http://www.pcg-random.org
79

0 commit comments

Comments
 (0)