forked from bitcoin-core/secp256k1
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add github workflow to also build with CMake
In v0.3.0, secp256k1 also added support for building via CMake. Let's add a CI workflow to exercise it. Co-authored-by: Antonio Muci <[email protected]>
- Loading branch information
1 parent
8ff47e4
commit a6d843b
Showing
1 changed file
with
46 additions
and
0 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,46 @@ | ||
name: Build using CMake | ||
|
||
on: | ||
push: | ||
branches: | ||
- frost | ||
pull_request: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-with-cmake: | ||
runs-on: ubuntu-22.04 | ||
# Use fedora:38 to compile using gcc-13 | ||
container: | ||
image: fedora:38 | ||
steps: | ||
- name: Install build dependencies | ||
run: | | ||
dnf install -y \ | ||
cmake \ | ||
gcc | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: Build with CMake | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake \ | ||
-DCMAKE_C_FLAGS="-Werror" \ | ||
-DCMAKE_BUILD_TYPE="Release" \ | ||
-DSECP256K1_BUILD_TESTS=ON \ | ||
-DSECP256K1_BUILD_EXHAUSTIVE_TESTS=OFF \ | ||
-DSECP256K1_BUILD_BENCHMARK=OFF \ | ||
-DSECP256K1_BUILD_EXAMPLES=ON \ | ||
-DSECP256K1_EXPERIMENTAL=ON \ | ||
-DSECP256K1_ENABLE_MODULE_FROST=ON \ | ||
.. | ||
make -j | ||
- name: Run FROST example | ||
run: | | ||
"${GITHUB_WORKSPACE}/build/examples/frost_example" | ||
- name: Run functional tests | ||
run: | | ||
"${GITHUB_WORKSPACE}/build/src/tests" |