Skip to content

Commit

Permalink
feat(ci): Add a basic-compilation-test.yml automated workflow
Browse files Browse the repository at this point in the history
Mainly targeting Linux, Windows (win32 target) and macOS (x64/arm64).
  • Loading branch information
dwatteau committed Jan 28, 2022
1 parent 4ef7034 commit c65d87f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ indent_style = tab
tab_width = 8
trim_trailing_whitespace = true

[*.{yml,yaml}]
indent_size = 2
indent_style = space
trim_trailing_whitespace = true

[Dockerfile*]
indent_style = tab
tab_width = 8
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ CMakeLists.txt text eol=lf
*.hpp text eol=lf
*.md text eol=lf
*.sh text eol=lf
*.yml text eol=lf
man/txt/*.txt text eol=crlf
48 changes: 48 additions & 0 deletions .github/workflows/basic-compilation-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Basic compilation test for most common platforms

on:
push:
branches: [ main ]
paths:
- '.github/workflows/basic-compilation-test.yml'
- 'CMakeLists.txt'
- 'src/**'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/basic-compilation-test.yml'
- 'CMakeLists.txt'
- 'src/**'

env:
BUILD_TYPE: RelWithDebInfo

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

strategy:
matrix:
include:
- name: 'Ubuntu 18.04 (default)'
os: ubuntu-18.04
extraargs: ''
- name: 'Windows Server 2019 (win32)'
os: windows-2019
extraargs: '-DCMAKE_GENERATOR_PLATFORM=Win32'
- name: 'macOS 11 (x86_64 and arm64)'
os: macos-11
extraargs: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"'

steps:
- uses: actions/checkout@v2

- name: Print CMake version
run: cmake --version

- name: Configure for ${{env.BUILD_TYPE}}
run: cmake -S . -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.extraargs }}

- name: Build
run: cmake --build ${{github.workspace}}/build -j2

0 comments on commit c65d87f

Please sign in to comment.