diff --git a/.editorconfig b/.editorconfig index b467a03..a095cac 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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 diff --git a/.gitattributes b/.gitattributes index 0e7681f..c1584d8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/.github/workflows/build-basic-test.yml b/.github/workflows/build-basic-test.yml new file mode 100644 index 0000000..c73704c --- /dev/null +++ b/.github/workflows/build-basic-test.yml @@ -0,0 +1,48 @@ +name: Basic compilation test for most common platforms + +on: + push: + branches: [ main ] + paths: + - '.github/workflows/build-basic-test.yml' + - 'CMakeLists.txt' + - 'src/**' + pull_request: + branches: [ main ] + paths: + - '.github/workflows/build-basic-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 -j1