-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add github actions * modify actions name
- Loading branch information
1 parent
5f2bbee
commit 0200cf9
Showing
1 changed file
with
108 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,108 @@ | ||
name: verkle-tree GitHub Actions | ||
on: | ||
push: | ||
paths-ignore: | ||
- "docs/**" | ||
- "Changelog.md" | ||
- "README.md" | ||
pull_request: | ||
paths-ignore: | ||
- "docs/**" | ||
- "Changelog.md" | ||
- "README.md" | ||
release: | ||
types: [published, created, edited] | ||
|
||
jobs: | ||
build_with_clang: | ||
name: build_with_clang | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 5 | ||
- name: install macOS dependencies | ||
if: runner.os == 'macOS' | ||
run: brew install ccache | ||
- name: install Ubuntu dependencies | ||
if: runner.os == 'Linux' | ||
run: sudo apt install -y git curl build-essential clang cmake | ||
- name: vcpkg essentials | ||
run: | | ||
git clone https://github.com/microsoft/vcpkg.git | ||
echo "VCPKG_ROOT=$(pwd)/vcpkg" >> "$GITHUB_ENV" | ||
echo "PATH=$PATH:$VCPKG_ROOT" >> "$GITHUB_ENV" | ||
- name: configure | ||
if: runner.os == 'macOS' | ||
run: | | ||
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) && CC=/usr/bin/clang CXX=/usr/bin/clang++ | ||
cmake --preset=test | ||
- name: configure | ||
if: runner.os == 'Linux' | ||
run: | | ||
export CC=/usr/bin/clang CXX=/usr/bin/clang++ | ||
cmake --preset=test | ||
- name: compile | ||
run: cmake --build build -j2 | ||
- name: run test | ||
run: cd build/bandersnatch && ctest | ||
build_with_gcc: | ||
name: build_with_gcc | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 5 | ||
- name: install Ubuntu dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y git curl build-essential cmake | ||
- name: vcpkg essentials | ||
run: | | ||
git clone https://github.com/microsoft/vcpkg.git | ||
echo "VCPKG_ROOT=$(pwd)/vcpkg" >> "$GITHUB_ENV" | ||
echo "PATH=$PATH:$VCPKG_ROOT" >> "$GITHUB_ENV" | ||
- name: configure | ||
run: | | ||
export GCC='gcc-10' | ||
export CXX='g++-10' | ||
cmake --preset=test | ||
- name: compile | ||
run: cmake --build build -j2 | ||
- name: run test | ||
run: cd build/bandersnatch && ctest | ||
ubuntu22_04_build_with_gcc: | ||
name: ubuntu22_04_build_with_gcc | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 5 | ||
- name: install Ubuntu dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y git curl build-essential cmake lcov libzstd-dev python3-dev | ||
- name: vcpkg essentials | ||
run: | | ||
git clone https://github.com/microsoft/vcpkg.git | ||
echo "VCPKG_ROOT=$(pwd)/vcpkg" >> "$GITHUB_ENV" | ||
echo "PATH=$PATH:$VCPKG_ROOT" >> "$GITHUB_ENV" | ||
- name: configure | ||
run: | | ||
export GCC='gcc-10' | ||
export CXX='g++-10' | ||
export CPATH=/Library/Developer/CommandLineTools/usr/include/c++/v1 | ||
cmake --preset=test | ||
- name: compile | ||
run: cmake --build build -j2 | ||
- name: run test | ||
run: cd build/bandersnatch && ctest |