0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-26 21:04:25 +08:00

Don't run GHA workflow on push to branches

Also convert line endings to Unix.
This commit is contained in:
Arseny Kapoulkine 2021-06-27 19:12:59 -07:00
parent e7b545b288
commit 0de580155d

View File

@ -1,46 +1,50 @@
name: build name: build
on: [push, pull_request] on:
push:
jobs: branches:
unix: - 'master'
strategy: pull_request:
matrix:
os: [ubuntu, macos] jobs:
compiler: [g++, clang++] unix:
defines: [standard, PUGIXML_WCHAR_MODE, PUGIXML_COMPACT, PUGIXML_NO_EXCEPTIONS] strategy:
exclude: matrix:
- os: macos os: [ubuntu, macos]
compiler: g++ compiler: [g++, clang++]
runs-on: ${{matrix.os}}-latest defines: [standard, PUGIXML_WCHAR_MODE, PUGIXML_COMPACT, PUGIXML_NO_EXCEPTIONS]
steps: exclude:
- uses: actions/checkout@v1 - os: macos
- name: make test compiler: g++
run: | runs-on: ${{matrix.os}}-latest
export CXX=${{matrix.compiler}} steps:
make test cxxstd=c++11 defines=${{matrix.defines}} config=release -j2 - uses: actions/checkout@v1
make test cxxstd=c++98 defines=${{matrix.defines}} config=debug -j2 - name: make test
make test defines=${{matrix.defines}} config=sanitize -j2 run: |
- name: make coverage export CXX=${{matrix.compiler}}
if: ${{matrix.os == 'ubuntu' && matrix.compiler == 'clang++'}} make test cxxstd=c++11 defines=${{matrix.defines}} config=release -j2
run: | make test cxxstd=c++98 defines=${{matrix.defines}} config=debug -j2
make test defines=${{matrix.defines}} config=coverage -j2 make test defines=${{matrix.defines}} config=sanitize -j2
bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov -X search -t ${{secrets.CODECOV_TOKEN}} -B ${{github.ref}} - name: make coverage
if: ${{matrix.os == 'ubuntu' && matrix.compiler == 'clang++'}}
windows: run: |
runs-on: windows-latest make test defines=${{matrix.defines}} config=coverage -j2
strategy: bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov -X search -t ${{secrets.CODECOV_TOKEN}} -B ${{github.ref}}
matrix:
arch: [Win32, x64] windows:
defines: [standard, PUGIXML_WCHAR_MODE, PUGIXML_COMPACT, PUGIXML_NO_EXCEPTIONS] runs-on: windows-latest
steps: strategy:
- uses: actions/checkout@v1 matrix:
- name: cmake configure arch: [Win32, x64]
run: cmake . -DPUGIXML_BUILD_TESTS=ON -DPUGIXML_BUILD_DEFINES=${{matrix.defines}} -A ${{matrix.arch}} defines: [standard, PUGIXML_WCHAR_MODE, PUGIXML_COMPACT, PUGIXML_NO_EXCEPTIONS]
- name: cmake test steps:
shell: bash # necessary for fail-fast - uses: actions/checkout@v1
run: | - name: cmake configure
cmake --build . -- -property:Configuration=Debug -verbosity:minimal run: cmake . -DPUGIXML_BUILD_TESTS=ON -DPUGIXML_BUILD_DEFINES=${{matrix.defines}} -A ${{matrix.arch}}
Debug/pugixml-check.exe - name: cmake test
cmake --build . -- -property:Configuration=Release -verbosity:minimal shell: bash # necessary for fail-fast
Release/pugixml-check.exe run: |
cmake --build . -- -property:Configuration=Debug -verbosity:minimal
Debug/pugixml-check.exe
cmake --build . -- -property:Configuration=Release -verbosity:minimal
Release/pugixml-check.exe