Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI for master branch PR

on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Show version of tools
run: |
gcc -v
g++ -v
make -v
cmake --version

- name: Cache apt packages
uses: actions/cache@v3
with:
path: /var/cache/apt/archives/*.deb
key: ${{ runner.os }}-apt-${{ hashFiles('apt-packages.txt') }}

- name: Install dependencies
run: |
sudo apt-get install libboost-dev
sudo apt-get install libprotobuf-dev protobuf-compiler libprotoc-dev libgoogle-perftools-dev
sudo apt-get install libboost-test-dev libboost-program-options-dev libboost-system-dev
sudo apt-get install libc-ares-dev libcurl4-openssl-dev
sudo apt-get install zlib1g-dev libgd-dev

- name: Set up environment variables
run: |
echo "BUILD_TYPE=debug" >> $GITHUB_ENV
echo "BUILD_TYPE=release" >> $GITHUB_ENV

- name: Build project
run: |
./build.sh