Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add Windows MSYS2, MacOS and QA workflow #24

Merged
merged 4 commits into from
Nov 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
Checks: >-
-*,
abseil-*,
portability-*,
misc-*,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-redundant-expression,

# All enabled checks shall be reported as error.
WarningsAsErrors: "*"

# Check all headers of the project.
HeaderFilterRegex: '.*'
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ max_line_length = 80
[*.{html,man,so}]
max_line_length = 400

[*.{yaml,yml}]
[*.{yaml,yml,clang-tidy}]
indent_size = 2
tab_width = 2

Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: CI-Linux
on: [push, pull_request]

jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
compiler:
- gcc-9
- gcc-10
- gcc-11
- clang-12
- clang-13
- clang-14

steps:
- name: Install prerequisites
run: >-
sudo apt-get install -y
libgcrypt20-dev
${{ matrix.compiler }}
cmake
ninja-build
doxygen
graphviz

- uses: actions/checkout@v3

- name: Configure
run: |
export CXX=$(echo ${{ matrix.compiler }} | sed -E 's/^(g|clang)(cc)?/\1++/')
cmake -G Ninja -S . -B build

- name: Build
working-directory: build
run: ninja srecord-executables

- name: Smoke test
working-directory: build
run: ninja srecord-executables-version

- name: Build test prerequisites
working-directory: build
run: ninja prepare-test

- name: Test
working-directory: build
run: ctest --output-on-failure --output-junit ctest.junit.xml
38 changes: 38 additions & 0 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: CI-MacOS
on: [push, pull_request]

jobs:
build:
name: Build and Test
runs-on: macos-latest

steps:
- name: Install prerequisites
run: >-
brew install
libgcrypt
ninja
doxygen
graphviz

- uses: actions/checkout@v3

- name: Configure
run: cmake -G Ninja -S . -B build

- name: Build
working-directory: build
run: ninja srecord-executables

- name: Smoke test
working-directory: build
run: ninja srecord-executables-version

- name: Build test prerequisites
working-directory: build
run: ninja prepare-test

- name: Test
working-directory: build
run: ctest --output-on-failure --output-junit ctest.junit.xml
59 changes: 59 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: CI-Windows
on: [push, pull_request]

jobs:
build:
name: MSYS2 Build and Test
runs-on: windows-latest

defaults:
run:
shell: msys2 {0}

strategy:
fail-fast: false
matrix:
include:
- sys: mingw64
env: x86_64
- sys: mingw32
env: i686
- sys: ucrt64
env: ucrt-x86_64

steps:
- name: Install prerequisites
uses: msys2/setup-msys2@v2
with:
# cSpell:ignore msystem
msystem: ${{ matrix.sys }}
install: >-
mingw-w64-${{ matrix.env }}-libgcrypt
mingw-w64-${{ matrix.env }}-gcc
mingw-w64-${{ matrix.env }}-cmake
mingw-w64-${{ matrix.env }}-ninja
mingw-w64-${{ matrix.env }}-doxygen
mingw-w64-${{ matrix.env }}-graphviz
diffutils

- uses: actions/checkout@v3

- name: Configure
run: cmake -G Ninja -S . -B build

- name: Build
working-directory: build
run: ninja srecord-executables

- name: Smoke test
working-directory: build
run: ninja srecord-executables-version

- name: Build test prerequisites
working-directory: build
run: ninja prepare-test

- name: Test
working-directory: build
run: ctest --output-on-failure --output-junit ctest.junit.xml
91 changes: 0 additions & 91 deletions .github/workflows/ci.yml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
name: QA
on: [push, pull_request]

jobs:
build:
name: Check source
runs-on: ubuntu-22.04

steps:
- name: Install prerequisites
run: >-
sudo apt-get install -y
libgcrypt20-dev
clang-14
clang-tidy-14
cmake
ninja-build
doxygen
graphviz

- uses: actions/checkout@v3

- name: Configure
env:
CXX: clang++-14
CXXFLAGS: >-
-std=c++11
-pedantic
-Wall
SRecord_CMake_Flags: >-
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON
run: |
cmake -G Ninja -S . -B build ${SRecord_CMake_Flags}

- name: Build
working-directory: build
run: ninja srecord-executables

- name: Smoke test
working-directory: build
run: ninja srecord-executables-version

- name: Build test prerequisites
working-directory: build
run: ninja prepare-test

- name: Test
working-directory: build
run: ctest --output-on-failure --output-junit ctest.junit.xml

- name: clang-tidy
if: always()
run: run-clang-tidy-14 -p build

docs:
name: Documentation
runs-on: ubuntu-22.04

steps:
- name: Install prerequisites
run: >-
sudo apt-get install -y
cmake
ninja-build
doxygen
graphviz
groff
psutils
ghostscript

- uses: actions/checkout@v3

- name: Configure
run: cmake -G Ninja -S . -B build

- name: man pages
working-directory: build
run: ninja man

- name: PDF
working-directory: build
run: ninja doco

- name: Doxygen
working-directory: build
run: ninja doxygen

- name: Web Site
working-directory: build
run: ninja man-html web-site
1 change: 1 addition & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ words:
- compl
- CSLEN
- csum
- CXXFLAGS
- DABEDE
- datarec
- dbyte
Expand Down
2 changes: 2 additions & 0 deletions doc/dictionaries/names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dg1yfe
DJGPP
Doxygen
dpkg
diffutils
Dragonball
Elektor
Elektuur
Expand Down Expand Up @@ -133,6 +134,7 @@ Torsten
Tridge
troff
TRSDOS
ucrt
Uncia
uudecode
Verilog
Expand Down
2 changes: 1 addition & 1 deletion doc/etc/BUILDING.man
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ will install updates flagged in the updated database.:
\f[I]\&...lots of output...\fP
\f[B]% \fPpacman -Syu
\f[I]\&...lots of output...\fP
\f[B]% \fPpacman -S mingw-w64-x86_64-gcc groff \\
\f[B]% \fPpacman -S mingw-w64-x86_64-gcc diffutils groff \\
\f[B] \fP mingw-w64-x86_64-libgcrypt mingw-w64-x86_64-cmake \\
\f[B] \fP mingw-w64-x86_64-graphviz mingw-w64-x86_64-ninja \\
\f[B] \fP mingw-w64-x86_64-doxygen mingw-w64-i686-ghostscript \\
Expand Down
Loading