From c0217aea5acb2a04ffaf837583ab59ece8b6497d Mon Sep 17 00:00:00 2001 From: Andrew James Date: Sun, 15 May 2022 22:39:26 +1000 Subject: [PATCH] Use github workflow for Codecov.io report --- .circleci/config.yml | 15 ---------- .github/workflows/Linux_x86_64_test.yml | 39 +++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/Linux_x86_64_test.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index ca65b1551..a68b6ee85 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,20 +17,6 @@ jobs: - run: Packaging/nix/AppImage.sh - store_artifacts: {path: ./devilutionx.appimage, destination: devilutionx_linux_x86_64.appimage} - store_artifacts: {path: ./devilutionx.tar.xz, destination: devilutionx_linux_x86_64.tar.xz} - linux_x86_64_test: - docker: - - image: debian:testing - working_directory: ~/repo - steps: - - checkout - - run: apt-get update -y - - run: apt-get install -y cmake curl g++ git lcov libgtest-dev libgmock-dev libfmt-dev libsdl2-dev libsodium-dev libpng-dev libbz2-dev - - run: cmake -S. -Bbuild -DENABLE_CODECOVERAGE=ON - - run: cmake --build build -j 2 - - run: cd build && ctest --output-on-failure - - run: bash <(curl -s https://codecov.io/bash) - environment: - CTEST_OUTPUT_ON_FAILURE: 1 switch: docker: - image: devkitpro/devkita64:latest @@ -85,7 +71,6 @@ workflows: testflow: jobs: - linux_x86_64 - - linux_x86_64_test - switch - 3ds - amigaos-m68k diff --git a/.github/workflows/Linux_x86_64_test.yml b/.github/workflows/Linux_x86_64_test.yml new file mode 100644 index 000000000..c3d282d9d --- /dev/null +++ b/.github/workflows/Linux_x86_64_test.yml @@ -0,0 +1,39 @@ +name: Linux_x86_64_test + +on: + push: + branches: + - master + pull_request: + types: [ opened, synchronize ] + + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install dependencies + run: | + sudo apt-get update -y + sudo apt-get install -y cmake curl g++ git lcov libgtest-dev libgmock-dev libfmt-dev libsdl2-dev libsodium-dev libpng-dev libbz2-dev + - name: Cache CMake build folder + uses: actions/cache@v3 + with: + path: build + key: linux-x86-64-test-cmake-v1-${{ github.sha }} + restore-keys: linux-x86-64-test-cmake-v1- + - name: Build tests + run: | + cmake -S. -Bbuild -DENABLE_CODECOVERAGE=ON + cmake --build build -j $(nproc) + - name: Run tests + run: cd build && ctest --output-on-failure + - name: Upload results + uses: codecov/codecov-action@v2 + # using default arguments, no token required for public repos