From b3cbf0a64439442e410e7762a664c98db7c58d0f Mon Sep 17 00:00:00 2001 From: patrick96 Date: Mon, 13 Feb 2023 21:51:18 +0100 Subject: [PATCH] ci: Update codecov and checkout actions The coverage job fails because of the outdated codecov action and the checkout v2 action uses a deprecated version of nodejs --- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/release.yml | 8 +++++--- src/x11/xresources.cpp | 2 ++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ec6ae5c..2a769b3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: env: COLOR: "ON" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.ref }} - name: Install Dependencies @@ -48,7 +48,7 @@ jobs: python3-xcbgen \ libuv1-dev \ xcb-proto - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true ref: ${{ github.event.inputs.ref }} @@ -115,7 +115,7 @@ jobs: if [ "$POLYBAR_BUILD_TYPE" = "tests" ]; then sudo apt-get install -y lcov fi - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true ref: ${{ github.event.inputs.ref }} @@ -125,7 +125,7 @@ jobs: run: ./common/ci/configure.sh - name: Build run: | - cd $BUILD_DIR + cd "$BUILD_DIR" make - name: Collect initial coverage if: ${{ matrix.polybar_build_type == 'tests' }} @@ -134,17 +134,17 @@ jobs: - name: Tests if: ${{ matrix.polybar_build_type == 'tests' }} run: | - cd $BUILD_DIR + cd "$BUILD_DIR" make check - name: Collect coverage if: ${{ matrix.polybar_build_type == 'tests' }} run: | lcov --capture --no-external --directory . -o cov_tests.info lcov --add-tracefile cov_base.info --add-tracefile cov_tests.info -o cov_total.info - lcov --remove cov_total.info ${PWD}'/build/*' ${PWD}'/tests/*' ${PWD}'/lib/*' -o cov.info + lcov --remove cov_total.info "${PWD}/build/*" "${PWD}/tests/*" "${PWD}/lib/*" -o cov.info - name: Upload Coverage if: ${{ matrix.polybar_build_type == 'tests' }} - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: flags: unittests files: ./cov.info diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a8d34c5..4ac2f512 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,9 +31,11 @@ jobs: RELEASE_TAG=${GITHUB_REF#refs/tags/} fi echo "Publishing Version $RELEASE_TAG" - echo "RELEASE_TAG=$RELEASE_TAG" >> "$GITHUB_ENV" - echo "POLYBAR_DIR=polybar-$RELEASE_TAG" >> "$GITHUB_ENV" - echo "POLYBAR_ARCHIVE=polybar-$RELEASE_TAG.tar.gz" >> "$GITHUB_ENV" + { + echo "RELEASE_TAG=$RELEASE_TAG" + echo "POLYBAR_DIR=polybar-$RELEASE_TAG" + echo "POLYBAR_ARCHIVE=polybar-$RELEASE_TAG.tar.gz" + } >> "$GITHUB_ENV" # Checks out the target tag - uses: actions/checkout@v2 diff --git a/src/x11/xresources.cpp b/src/x11/xresources.cpp index 49d4aa2e..4f4e5d53 100644 --- a/src/x11/xresources.cpp +++ b/src/x11/xresources.cpp @@ -1,5 +1,7 @@ #include "x11/xresources.hpp" +#include "common.hpp" + POLYBAR_NS template <>