-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github Actions support (cherry picked from master)
- Loading branch information
1 parent
e0243e6
commit d4eccea
Showing
5 changed files
with
85 additions
and
1 deletion.
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: / | ||
schedule: | ||
interval: weekly |
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,3 @@ | ||
none/tests/log-track-fds (stderr) | ||
none/tests/track-fds-exec-children (stderr) | ||
none/tests/xml-track-fds (stderr) |
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,71 @@ | ||
name: Build | ||
|
||
on: [push] | ||
|
||
env: | ||
TEST_FOLDER: .github/test | ||
|
||
jobs: | ||
build_various_platforms: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-24.04] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
name: Build and Test on ${{matrix.os}} | ||
|
||
steps: | ||
- name: install dependencies (MacOS) | ||
run: brew update && brew install automake | ||
if: ${{ matrix.os != 'ubuntu-24.04' }} | ||
- name: install dependencies (Linux) | ||
run: sudo apt-get update && sudo apt-get install libc6-dbg gdb | ||
if: ${{ matrix.os == 'ubuntu-24.04' }} | ||
- name: checkout project | ||
uses: actions/checkout@v1 | ||
- name: calculate short SHA | ||
id: sha | ||
run: echo "short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: autogen.sh | ||
run: ./autogen.sh | ||
- name: configure | ||
run: ./configure | ||
- name: build | ||
run: make | ||
- name: try ls -l | ||
run: ./vg-in-place ls -l | ||
- name: build regression tests | ||
run: make check | ||
- name: create artifacts folder | ||
run: mkdir -p ${{ env.TEST_FOLDER }}/outputs | ||
- name: build tests | ||
run: make check | ||
- name: run regression tests | ||
run: make regtest | tee raw-results.txt | ||
- name: process results | ||
if: always() | ||
run: awk '/^== [0-9]+ tests, .* ==$/{flag=1;next}/^$/{flag=0}flag' < raw-results.txt > ${{ env.TEST_FOLDER }}/results.txt | ||
- name: copy failing test outputs | ||
if: always() | ||
run: cat ${{ env.TEST_FOLDER }}/results.txt | cut -f 1 -d' ' | xargs -L1 -I % sh -c 'cp %.*.diff* ${{ env.TEST_FOLDER }}/outputs/' | ||
- name: calculate difference between tests | ||
if: always() | ||
uses: LouisBrunner/diff-action@v0.2.0 | ||
with: | ||
old: .github/${{ matrix.os }}-expected.txt | ||
new: ${{ env.TEST_FOLDER }}/results.txt | ||
mode: deletion | ||
tolerance: same | ||
output: ${{ env.TEST_FOLDER }}/results.diff | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
title: ${{ matrix.os }} | ||
notify_check: true | ||
notify_issue: true | ||
- name: upload artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-results-${{ steps.sha.outputs.short }}-${{ matrix.os }} | ||
path: ${{ env.TEST_FOLDER }}/ |
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
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