--- /dev/null
+name: CI
+
+on:
+ push:
+ # Sequence of patterns matched against refs/heads
+ branches:
+ - master
+ pull_request:
+ types:
+ - labeled
+ - unlabeled
+ - synchronize
+ - opened
+ - edited
+ - ready_for_review
+ - reopened
+ - unlocked
+ workflow_dispatch:
+ status: {}
+jobs:
+ # Build and run tests. Note that the valgrind tests crash.
+ build-and-test:
+ name: Build monocypher and run unit tests
+ strategy:
+ matrix:
+ platform: [ubuntu-latest]
+ runs-on: ${{ matrix.platform }}
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Ubuntu apt-get update
+ run: sudo apt-get update
+
+ - name: Install libsodium
+ run: sudo apt-get install -y libsodium-dev
+
+ - name: Install clang and llvm
+ run: sudo apt-get install -y clang llvm
+
+ - name: Install valgrind
+ run: sudo apt-get install -y valgrind
+
+ - name: Make test vectors
+ run: |
+ pushd tests/gen
+ make clean && make
+ popd
+
+ - name: Run tests
+ run: make clean && make test
+
+ - name: Run speed tests
+ run: |
+ make clean && make speed
+
+ - name: Run code coverage tests
+ run: |
+ ./tests/coverage.sh
+
+ # This test fails with a crash. The set +e handles this for now, but the source of the crash
+ # should be found and fixed.
+ - name: Run tests with clang sanitizers and valgrind (Fails!)
+ run: |
+ set +e
+ ./tests/test.sh
+ set -e