Skip to content

Commit

Permalink
Issue #12: Add basic CI for linux and windows, move broken bins to br…
Browse files Browse the repository at this point in the history
…oken so make test succeeds

TODO: MacOS, generate tagged zip files on release
  • Loading branch information
nyetwurk committed Oct 27, 2024
1 parent e503ccc commit b9301e4
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/debian-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Debian Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: install libgmp-dev
run: |
sudo apt-get update
sudo apt-get install -y libgmp-dev
- uses: actions/checkout@v4
- name: make
run: make
- name: make test
run: make test
- uses: rlespinasse/github-slug-action@v4
if: ${{ github.event_name != 'release' }}
with:
short-length: 6
- uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' }}
with:
name: me7sum-${{ env.GITHUB_SHA_SHORT }}-debian
path: |
me7sum
ME7Check_linux
README.md
32 changes: 32 additions & 0 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Windows Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x86
- name: build
run: nmake
- uses: rlespinasse/github-slug-action@v4
if: ${{ github.event_name != 'release' }}
with:
short-length: 6
- uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' }}
with:
name: me7sum-${{ env.GITHUB_SHA_SHORT }}-win
path: |
me7sum.exe
ME7Check.exe
README.md
4 changes: 4 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ endif

include makefile.common

.PHONY: test
test:
./test.sh

win: force
./build.cmd clean
./build.cmd
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 8 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/sh

rm -f err.log
trap "rm -rf err.log" EXIT
for i in bins/*.bin; do
./me7sum -r $i.txt $i | grep -E '(ABORT|WARNING)'
grep ERROR $i.txt
./me7sum -r $i.txt $i | grep -E '(ABORT|WARNING)' >> err.log
grep ERROR $i.txt >> err.log
done

cat err.log
[ ! -s err.log ]

0 comments on commit b9301e4

Please sign in to comment.