Skip to content

Commit

Permalink
add github actions (#2)
Browse files Browse the repository at this point in the history
* add github actions

* modify actions name
  • Loading branch information
guozhengxuan authored Aug 23, 2024
1 parent 5f2bbee commit 0200cf9
Showing 1 changed file with 108 additions and 0 deletions.
108 changes: 108 additions & 0 deletions .github/workflows/workflow.yml
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

0 comments on commit 0200cf9

Please sign in to comment.