cd3661fa58
Some checks failed
build-crpc / build (Release, mingw-w64-x86_64.toolchain.cmake) (push) Waiting to run
build-crpc / build (Debug, host.toolchain.cmake) (push) Waiting to run
build-crpc / build (Debug, mingw-w64-x86_64.toolchain.cmake) (push) Failing after 33s
build-crpc / build (Release, host.toolchain.cmake) (push) Failing after 38s
48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
name: build-crpc
|
|
on:
|
|
- push
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
build_type:
|
|
- Debug
|
|
- Release
|
|
toolchain:
|
|
- mingw-w64-x86_64.toolchain.cmake
|
|
- host.toolchain.cmake
|
|
steps:
|
|
- name: Install Dependencies
|
|
run: |
|
|
apt-get update -y
|
|
apt-get install -y \
|
|
cmake make g++ libssl-dev pkg-config autoconf libtool libantlr4-runtime-dev default-jre-headless
|
|
- uses: actions/checkout@v4
|
|
- name: Generate Lexer and Parser
|
|
run: |
|
|
wget https://www.antlr.org/download/antlr-4.13.1-complete.jar -o antlr.jar
|
|
cd ${{ github.workspace }}/src/grammar
|
|
java -jar antlr.jar -Dlanguage=Cpp -o ./ ProtoLexer.g4
|
|
java -jar antlr.jar -Dlanguage=Cpp -o ./ ProtoParser.g4
|
|
- name: Configure CRPC
|
|
run: |
|
|
cd ${{ github.workspace }}
|
|
# use static link
|
|
cmake . -Bbuild \
|
|
-DCMAKE_TOOLCHAIN_FILE=toolchains/${{ matrix.toolchain }} \
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" \
|
|
-DCMAKE_C_FLAGS="-static-libgcc -static-libstdc++"
|
|
|
|
- name: Build CRPC
|
|
run: |
|
|
cmake --build build --config ${{ matrix.build_type }} --target all -- -j `nproc`
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: crpc-${{ matrix.toolchain }}-${{ matrix.build_type }}
|
|
path: ${{ github.workspace }}/build/crpc
|