From d840c7a12d11dccb995d431524aa85b4bb862259 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Thu, 24 Mar 2022 22:15:46 +0100 Subject: [PATCH] Use workflow instead of action --- .github/actions/check/action.yml | 43 ------------------------------ .github/workflows/check.yml | 37 +++++++++++++++++++++++++ .github/workflows/pull_request.yml | 4 +-- .github/workflows/push.yml | 2 +- 4 files changed, 40 insertions(+), 46 deletions(-) delete mode 100644 .github/actions/check/action.yml create mode 100644 .github/workflows/check.yml diff --git a/.github/actions/check/action.yml b/.github/actions/check/action.yml deleted file mode 100644 index 8ccde53de..000000000 --- a/.github/actions/check/action.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: build and check fastfetch -description: builds and checks fastfetch - -runs: - using: composite - steps: - - name: install required packages - shell: sh - run: sudo apt-get update && sudo apt-get install -y libpci-dev libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libxfconf-0-dev librpm-dev libzstd-dev - - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - - - name: configure project - shell: sh - # We reuse the build binary only for the releases. - # We set tweak version to off, because it is wrong, as git tag will happen after this step. Releases don't have a tweak, so this is ok. - run: cmake -DSET_TWEAK=Off . - - - name: build project - shell: sh - run: cmake --build . -j$(nproc) - - - name: run fastfetch - shell: sh - run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true - - - name: run flashfetch - shell: sh - run: ./flashfetch - - - name: run tests - shell: sh - run: ctest - - - name: build deb package - shell: sh - run: sh packaging/deb/create.sh . - - - name: perform CodeQL analysis - uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 000000000..ace8e9238 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,37 @@ +name: build and check + +on: workflow_call + +jobs: + check: + name: build and check + runs-on: ubuntu-latest + steps: + - name: install required packages + run: sudo apt-get update && sudo apt-get install -y libpci-dev libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libxfconf-0-dev librpm-dev libzstd-dev + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + + - name: configure project + # We reuse the build binary only for the releases. + # We set tweak version to off, because it is wrong, as git tag will happen after this step. Releases don't have a tweak, so this is ok. + run: cmake -DSET_TWEAK=Off . + + - name: build project + run: cmake --build . -j$(nproc) + + - name: run fastfetch + run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true + + - name: run flashfetch + run: ./flashfetch + + - name: run tests + run: ctest + + - name: build deb package + run: sh packaging/deb/create.sh . + + - name: perform CodeQL analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index fb27727a3..1a8f5294e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -3,7 +3,7 @@ name: manage pull requests on: pull_request jobs: - manage: + check: name: manage pull request runs-on: ubuntu-latest permissions: @@ -13,4 +13,4 @@ jobs: uses: actions/checkout@v2 - name: run build and check - uses: ./.github/actions/check + uses: ./.github/workflows/check diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7dc46a661..f09ded9d1 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v2 - name: run build and check - uses: ./.github/actions/check + uses: ./.github/workflows/check - name: get fastfetch version id: get_version_fastfetch