Skip to content

Commit

Permalink
Add github CI workflow (from PR #7).
Browse files Browse the repository at this point in the history
Contributed by Aleksa Sarai.
  • Loading branch information
archiecobbs committed Jun 7, 2023
1 parent 864c1cf commit d2f836b
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 3 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: ci
on:
push:
tags:
- v*
branches:
- master
pull_request:
schedule:
- cron: '30 6 * * 1'
permissions:
contents: read

jobs:
test:
strategy:
fail-fast: false
matrix:
# The set of compilers provided in each Ubuntu version comes from:
# <https://askubuntu.com/questions/466651/how-do-i-use-the-latest-gcc-on-ubuntu/1163021#1163021>
os: [ubuntu-22.04]
cc: [gcc-9, gcc-10, gcc-11, gcc-12, clang-11, clang-12, clang-13, clang-14]
include:
# Latest gcc and clang versions in Ubuntu.
- os: ubuntu-latest
cc: gcc
- os: ubuntu-latest
cc: clang
# Ubuntu 20.04 -- GCC 7..8 and clang 7..10.
# TODO: Find a nicer way to do this...
- os: ubuntu-20.04
cc: gcc-7
- os: ubuntu-20.04
cc: gcc-8
- os: ubuntu-20.04
cc: clang-7
- os: ubuntu-20.04
cc: clang-8
- os: ubuntu-20.04
cc: clang-9
- os: ubuntu-20.04
cc: clang-10
name: make check (${{matrix.os}}, ${{ matrix.cc }})
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.cc }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: install ${{ matrix.cc }}
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.cc }}
- name: autoconf
run: ./autogen.sh && ./configure
- name: make
run: make
- name: make check
run: make check

6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ EXTRA_libnbcompat_la_DEPENDENCIES: $(LTLIBOBJS)
# Test programs.
TESTS = rmd160-test sha1-test sha2-test
check_PROGRAMS = rmd160-test sha1-test sha2-test
rmd160_test_LDADD = .libs/libnbcompat.a
sha1_test_LDADD = .libs/libnbcompat.a
sha2_test_LDADD = .libs/libnbcompat.a
rmd160_test_LDADD = .libs/libnbcompat.la
sha1_test_LDADD = .libs/libnbcompat.la
sha2_test_LDADD = .libs/libnbcompat.la

# It's bad form to install your "config.h", so we tweak it to make it less harmful
install-data-hook:
Expand Down

0 comments on commit d2f836b

Please sign in to comment.