Add GitHub Actions workflow #1
Workflow file for this run
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
name: Build | |
on: [push, pull_request] | |
env: | |
buildDir: ${{ github.workspace }}/build/ | |
jobs: | |
build: | |
strategy: | |
matrix: | |
# macos-xlarge for ARM64 | |
runon: [ubuntu-latest, macos-13-xlarge] | |
runs-on: ${{ matrix.runon }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Checkout libsodium | |
run: | | |
git clone -n https://github.com/jedisct1/libsodium.git | |
cd libsodium && git checkout 3c49e89c19d06d9967180dda887fb15ae2e0fa40 && cd .. | |
- name: Build libsodium | |
run: | | |
sudo apt-get install libtool libnss3-dev libssl-dev libwolfssl-dev | |
cd libsodium && ./autogen.sh -s && ./configure --enable-opt && make -j $(nproc) && make check && sudo make install && sudo ldconfig && cd .. | |
- name: Build and run | |
run: | | |
cat /proc/cpuinfo | |
mkdir build && cd build | |
cmake .. && make -j $(nproc) | |
./crypto_benchmark |