-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mity:master' into master
- Loading branch information
Showing
51 changed files
with
5,826 additions
and
4,637 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Build and Test | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
# Linux builds. | ||
# | ||
# gcc sometimes warns (e.g. about potentially uninitialized variables) only | ||
# when some optimizations are enabled. So we build Debug as well as Release | ||
# on Linux. The Debug build also collects and uploads test coverage. | ||
linux-debug: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Configure | ||
run: CFLAGS='--coverage -Werror' cmake -DCMAKE_BUILD_TYPE=Debug -G 'Unix Makefiles' . | ||
- name: Build | ||
run: make VERBOSE=1 | ||
- name: Test | ||
run: python3 ./scripts/run-tests.py | ||
- name: Create coverage report | ||
run: | | ||
sudo apt-get install -y lcov | ||
lcov --directory . --capture --output-file coverage.info | ||
lcov --remove coverage.info '/usr/*' --output-file coverage.info | ||
lcov --list coverage.info | ||
- name: Upload coverage report | ||
uses: codecov/codecov-action@v3 | ||
|
||
linux-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Configure | ||
run: CFLAGS='--coverage -Werror' cmake -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' . | ||
- name: Build | ||
run: make VERBOSE=1 | ||
- name: Test | ||
run: python3 ./scripts/run-tests.py | ||
|
||
# Windows builds. | ||
# | ||
# We do both 32 and 64-bit builds. Also note 32-bit does Debug build while | ||
# 64-bit one does Release build. (Full matrix would likely be an overkill.) | ||
windows-32-debug: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Dev command prompt | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: x86 | ||
- name: Configure | ||
run: cmake -DCMAKE_BUILD_TYPE=Debug -G "NMake Makefiles" . | ||
- name: Build | ||
run: nmake | ||
- name: Test | ||
run: python .\scripts\run-tests.py | ||
|
||
windows-64-release: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Dev command prompt | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: x64 | ||
- name: Configure | ||
run: cmake -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" . | ||
- name: Build | ||
run: nmake | ||
- name: Test | ||
run: python .\scripts\run-tests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Fuzz Test | ||
on: | ||
pull_request: | ||
paths: | ||
- '**.c' | ||
- '**.h' | ||
jobs: | ||
Fuzzing: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
steps: | ||
- name: Build Fuzzers | ||
id: build | ||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master | ||
with: | ||
oss-fuzz-project-name: 'md4c' | ||
language: c | ||
- name: Run Fuzzers | ||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master | ||
with: | ||
oss-fuzz-project-name: 'md4c' | ||
fuzz-seconds: 600 | ||
output-sarif: true | ||
- name: Upload Crash | ||
uses: actions/upload-artifact@v3 | ||
if: failure() && steps.build.outcome == 'success' | ||
with: | ||
name: artifacts | ||
path: ./out/artifacts | ||
- name: Upload Sarif | ||
if: always() && steps.build.outcome == 'success' | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
# Path to SARIF file relative to the root of the repository | ||
sarif_file: cifuzz-sarif/results.sarif | ||
checkout_path: cifuzz-sarif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.