Skip to content

Commit 83e2787

Browse files
Use reusable action for check
1 parent ef5a938 commit 83e2787

File tree

4 files changed

+46
-47
lines changed

4 files changed

+46
-47
lines changed

.github/actions/check/action.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: build and check fastfetch
2+
description: builds and checks fastfetch
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: install required packages
8+
shell: sh
9+
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
10+
11+
- name: Initialize CodeQL
12+
uses: github/codeql-action/init@v1
13+
with:
14+
languages: ${{ matrix.language }}
15+
16+
- name: configure project
17+
shell: sh
18+
# We reuse the build binary only for the releases.
19+
# 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.
20+
run: cmake -DSET_TWEAK=Off .
21+
22+
- name: build project
23+
shell: sh
24+
run: cmake --build . -j$(nproc)
25+
26+
- name: run fastfetch
27+
shell: sh
28+
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true
29+
30+
- name: run flashfetch
31+
shell: sh
32+
run: ./flashfetch
33+
34+
- name: run tests
35+
shell: sh
36+
run: ctest
37+
38+
- name: build deb package
39+
shell: sh
40+
run: sh packaging/deb/create.sh .
41+
42+
- name: perform CodeQL analysis
43+
shell: sh
44+
uses: github/codeql-action/analyze@v1

.github/workflows/check.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
uses: actions/checkout@v2
1212

1313
- name: run build and check
14-
uses: LinusDierheimer/fastfetch/.github/workflows/check.yml@master
14+
uses: ./.github/actions/check

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: actions/checkout@v2
1616

1717
- name: run build and check
18-
uses: LinusDierheimer/fastfetch/.github/workflows/check.yml@master
18+
uses: ./.github/actions/check
1919

2020
- name: get fastfetch version
2121
id: get_version_fastfetch

0 commit comments

Comments
 (0)