Restore building protobuf #132
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-and-test | |
on: [push] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install abseil library | |
run: | | |
git clone https://github.com/abseil/abseil-cpp.git | |
cd abseil-cpp | |
mkdir build && cd build | |
sudo apt install cmake | |
cmake .. | |
sudo cmake --build . --target install | |
- name: Cache protobuf library | |
id: cache-protobuf | |
uses: actions/cache@v1 | |
with: | |
path: protobuf | |
key: ${{ runner.os }}-protobuf | |
- name: Build protobuf library | |
if: steps.cache-protobuf.outputs.cache-hit != 'true' | |
run: | | |
git clone https://github.com/protocolbuffers/protobuf.git | |
cd protobuf | |
git checkout tags/v23.0 | |
git submodule update --init --recursive | |
cmake . -DCMAKE_CXX_STANDARD=14 | |
cmake --build . | |
- name: Install protobuf library | |
if: always() | |
run: | | |
cd protobuf | |
sudo make install | |
sudo ldconfig | |
- name: Build and test ADAK | |
if: always() | |
run: make all build-and-test USE_CORES=1 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: outputs | |
path: build/src/outputs/ |