Skip to content

Commit

Permalink
ci: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Nov 9, 2023
1 parent 13f260e commit 1f924b6
Showing 1 changed file with 6 additions and 73 deletions.
79 changes: 6 additions & 73 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,15 @@ on:
- master

jobs:
# Enforce the standard of g_malloc instead of malloc in the project
enforce-g_malloc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Clone the whole branch, we have to fetch tags later
fetch-depth: 0

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

build:
strategy:
matrix:
CC:
- clang
- gcc
distro:
- alpine
- archlinux
- debian-stretch
- debian-buster
- fedora
- ubuntu-xenial
- ubuntu-bionic
- ubuntu-focal

env:
CC: ${{ matrix.CC }}
EXTRA_CFLAGS: "-Werror"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Clone the whole branch, we have to fetch tags later
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- run: pip3 install meson ninja
- uses: actions/checkout@v4

# Fetch tags to determine proper version number inside git
- name: fetch tags
run: git fetch --tags
# We cannot pull tags with old distros, since there is no `.git`. See below.
if: "! (matrix.distro == 'ubuntu-bionic' || matrix.distro == 'ubuntu-xenial' || matrix.distro == 'debian-stretch')"

# The Github checkout Action doesn't support distros with git older than 2.18
# With git<2.18 it downloads the code via API and does not clone it via git :facepalm:
# To succeed the tests, we have to manually replace the VERSION macro
- name: fix version number for old distros
run: 'sed -i "s/-non-git/-ci-oldgit-$GITHUB_SHA/" Makefile'
if: " (matrix.distro == 'ubuntu-bionic' || matrix.distro == 'ubuntu-xenial' || matrix.distro == 'debian-stretch')"
- name: Install dependencies
- run: |
sudo apt install -y ninja-build python3-pip
pip3 install meson
- name: Setup
run: meson setup build
Expand All @@ -69,26 +25,3 @@ jobs:

- name: Run tests
run: ninja -C build test

runs-on: ubuntu-latest
container:
image: dunst/ci:${{ matrix.distro }}

doxygen:
strategy:
matrix:
distro:
- misc-doxygen

steps:
- uses: actions/checkout@v2
with:
# Clone the whole branch, we have to fetch tags later
fetch-depth: 0

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

runs-on: ubuntu-latest
container:
image: dunst/ci:${{ matrix.distro }}

0 comments on commit 1f924b6

Please sign in to comment.