Skip to content

Commit

Permalink
fixup! Rewrite github action
Browse files Browse the repository at this point in the history
  • Loading branch information
zappolowski committed Apr 3, 2024
1 parent 47655a2 commit 476ad25
Showing 1 changed file with 50 additions and 36 deletions.
86 changes: 50 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
enforce-g_malloc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: enforce-g_malloc
run: "! git grep -P '(?<!g_)malloc' ':!.valgrind.suppressions' ':!.github/workflows/main.yml'"
- name: enforce-g_malloc
run: "! git grep -P '(?<!g_)malloc' ':!.valgrind.suppressions' ':!.github/workflows/main.yml'"

build:
strategy:
Expand All @@ -38,55 +38,69 @@ jobs:
EXTRA_CFLAGS: "-Werror ${{ (matrix.distro == 'debian-bookworm' || matrix.distro == 'ubuntu-jammy') && matrix.CC == 'clang' && '-gdwarf-4' || ' '}}"

steps:
- uses: actions/checkout@v4
with:
# Clone the whole history including tags.
fetch-depth: 0
- uses: actions/checkout@v4
with:
# Clone the whole history including tags.
fetch-depth: 0

- name: setup $HOME for git
run: echo "HOME=${RUNNER_TEMP}" >> ${GITHUB_ENV}
- name: setup $HOME for git
run: echo "HOME=${RUNNER_TEMP}" >> ${GITHUB_ENV}

- name: configure safe directory for git
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: configure safe directory for git
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}

- name: build
run: make -j all dunstify test/test
- name: build
run: make -j all dunstify test/test

- name: test
run: make -j test
- name: test
run: make -j test

- name: installation
run: ./test/test-install.sh
- name: installation
run: ./test/test-install.sh

- name: valgrind memleaks
run: make -j clean test-valgrind
- name: valgrind memleaks
run: make -j clean test-valgrind

- name: coverage
run: make clean test-coverage
runs-on: ubuntu-latest
container:
image: ghcr.io/dunst-project/docker-images:${{ matrix.distro }}

- name: Generate coverage report
run: lcov -c -d . -o lcov.info
if: "matrix.CC == 'gcc'"
coverage:
needs: build
if: github.repository == 'dunst-project/dunst'
env:
CC: gcc

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: ${{ matrix.distro }}-${{ matrix.CC }}
fail_ci_if_error: true
if: "matrix.CC == 'gcc'"
steps:
- uses: actions/checkout@v4
with:
# Clone the whole history including tags.
fetch-depth: 0

- name: coverage
run: make clean test-coverage

- name: Generate coverage report
run: lcov -c -d . -o lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: fedora-gcc
fail_ci_if_error: true

runs-on: ubuntu-latest
container:
image: ghcr.io/dunst-project/docker-images:${{ matrix.distro }}
image: ghcr.io/dunst-project/docker-images:fedora

doxygen:
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: doxygen
run: make -j doc-doxygen
- name: doxygen
run: make -j doc-doxygen

runs-on: ubuntu-latest
container:
Expand Down

0 comments on commit 476ad25

Please sign in to comment.