mirror of
https://github.com/iustin/mt-st.git
synced 2026-01-07 12:35:19 +00:00
And also add the token for uploading, as the last commit ran into rate ACLs. Note entirely sure about arguments, let's see.
101 lines
2.2 KiB
YAML
101 lines
2.2 KiB
YAML
on:
|
|
# Trigger the workflow on push or
|
|
# pull request, but only for the
|
|
# main branch.
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
# Weekly run to account for
|
|
# changed dependencies.
|
|
schedule:
|
|
- cron: "17 04 * * 0"
|
|
# Manual trigger
|
|
workflow_dispatch:
|
|
|
|
name: CI
|
|
jobs:
|
|
build:
|
|
name: Build and test
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
compiler: ["gcc", "clang"]
|
|
fail-fast: false
|
|
env:
|
|
CC: ${{ matrix.compiler }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build the code
|
|
run: make
|
|
|
|
- name: Install dependencies
|
|
run: sudo apt-get install -yy shelltestrunner
|
|
|
|
- name: Test creating the release archive
|
|
run: make distcheck
|
|
|
|
coverage:
|
|
name: Check code coverage
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CC: gcc
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
run: sudo apt-get install -yy shelltestrunner
|
|
|
|
- name: Build the code
|
|
run: make CFLAGS=-coverage
|
|
|
|
- name: Run tests under coverage
|
|
run: make check
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
name: codecov-gcc
|
|
fail_ci_if_error: true
|
|
verbose: true
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
sanitizers:
|
|
name: Test with clang sanitizers
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
compiler: ["clang"]
|
|
# These are the various sanitizers from https://github.com/google/sanitizers:
|
|
cflags:
|
|
- "-fsanitize=address -O1 -fno-omit-frame-pointer -g"
|
|
- "-fsanitize=memory -fsanitize-memory-track-origins -fPIE -pie -fno-omit-frame-pointer -g -O2"
|
|
- "-fsanitize=undefined"
|
|
|
|
fail-fast: false
|
|
env:
|
|
CC: ${{ matrix.compiler }}
|
|
CFLAGS: ${{ matrix.cflags }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build the code
|
|
run: make
|
|
|
|
- name: Install dependencies
|
|
run: sudo apt-get install -yy shelltestrunner
|
|
|
|
- name: Run tests
|
|
run: make check
|