From 1d929ee2e71e8e18490ed1266175833e6ad5c609 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 17 Jan 2022 01:49:37 +0800 Subject: ... --- .github/workflows/ci.yml | 69 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/macos-ci.yml | 42 ------------------------ .github/workflows/windows-ci.yml | 41 ------------------------ 3 files changed, 69 insertions(+), 83 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/macos-ci.yml delete mode 100644 .github/workflows/windows-ci.yml (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..670a26ca --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,69 @@ +name: CI + +on: + push: + branches: [main] + paths-ignore: + - "docs/**" + - "**/README.md" + pull_request: + branches: [main] + paths-ignore: + - "docs/**" + - "**/README.md" + +jobs: + macos-build: + name: Build + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + + - name: Restore Cache + uses: actions/cache@v2 + with: + path: ~/.cache/vcpkg/archives + key: vcpkg-${{ runner.os }} + + - name: Setup Ninja + uses: ashutoshvarma/setup-ninja@master + with: + version: 1.10.2 + + - name: Build + run: | + cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ -H. -B./build -G Ninja + cmake --build ./build --config Debug --target all + + - name: Test + working-directory: build + run: | + ctest -C Debug -T test --output-on-failure + + windows-build: + name: Build + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Restore Cache + uses: actions/cache@v2 + with: + path: ~/AppData/Local/vcpkg/archives + key: vcpkg-${{ runner.os }} + + - name: Setup Ninja + uses: ashutoshvarma/setup-ninja@master + with: + version: 1.10.2 + + - name: Run build script + shell: pwsh + run: | + . ./tools/Use-VC.ps1 + Use-VC + mkdir build && cd build + cmake .. -G Ninja -DCMAKE_BUILD_TYPE:STRING=Debug + ninja all diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml deleted file mode 100644 index f46cd156..00000000 --- a/.github/workflows/macos-ci.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: macOS CI - -on: - push: - branches: [master] - paths-ignore: - - "docs/**" - - "**/README.md" - pull_request: - branches: [master] - paths-ignore: - - "docs/**" - - "**/README.md" - -jobs: - build: - name: Build - runs-on: macos-latest - - steps: - - uses: actions/checkout@v2 - - - name: Restore Cache - uses: actions/cache@v2 - with: - path: ~/.cache/vcpkg/archives - key: vcpkg-${{ runner.os }} - - - name: Setup Ninja - uses: ashutoshvarma/setup-ninja@master - with: - version: 1.10.2 - - - name: Build - run: | - cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ -H. -B./build -G Ninja - cmake --build ./build --config Debug --target all - - - name: Test - working-directory: build - run: | - ctest -C Debug -T test --output-on-failure diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml deleted file mode 100644 index 4a3be7cf..00000000 --- a/.github/workflows/windows-ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Windows CI - -on: - push: - branches: [master] - paths-ignore: - - "docs/**" - - "**/README.md" - pull_request: - branches: [master] - paths-ignore: - - "docs/**" - - "**/README.md" - -jobs: - build: - name: Build - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - - name: Restore Cache - uses: actions/cache@v2 - with: - path: ~/AppData/Local/vcpkg/archives - key: vcpkg-${{ runner.os }} - - - name: Setup Ninja - uses: ashutoshvarma/setup-ninja@master - with: - version: 1.10.2 - - - name: Run build script - shell: pwsh - run: | - . ./tools/Use-VC.ps1 - Use-VC - mkdir build && cd build - cmake .. -G Ninja -DCMAKE_BUILD_TYPE:STRING=Debug - ninja all -- cgit v1.2.3