|
| 1 | +name: rockylinux8-gcc13 |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: ["main", "dev"] |
| 6 | + pull_request: |
| 7 | + branches: ["main"] |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + container: |
| 13 | + image: rockylinux/rockylinux:8 |
| 14 | + options: --privileged |
| 15 | + |
| 16 | + steps: |
| 17 | + - name: Checkout repository |
| 18 | + uses: actions/checkout@v3 |
| 19 | + - name: Install Build Dependencies |
| 20 | + run: | |
| 21 | + set -o xtrace |
| 22 | + dnf -y install dnf-plugins-core |
| 23 | + dnf -y config-manager --set-enabled powertools |
| 24 | + dnf -y install \ |
| 25 | + https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm |
| 26 | + rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* |
| 27 | + dnf -y --exclude=systemtap --exclude=subversion install @development \ |
| 28 | + wget cmake git\ |
| 29 | + openssl-devel \ |
| 30 | + gcc-toolset-13* python3.11.x86_64 python3.11-devel.x86_64 sudo |
| 31 | +
|
| 32 | + - name: checkout |
| 33 | + uses: actions/checkout@v3 |
| 34 | + - name: build |
| 35 | + run: | |
| 36 | + source /opt/rh/gcc-toolset-13/enable |
| 37 | + python3.11 -m venv env |
| 38 | + source env/bin/activate |
| 39 | + sudo pip install -r requirements.txt |
| 40 | + wget https://github.com/xmake-io/xmake/releases/download/v2.9.9/xmake-v2.9.9.gz.run |
| 41 | + chmod 777 xmake-v2.9.9.gz.run |
| 42 | + ./xmake-v2.9.9.gz.run |
| 43 | + source ~/.xmake/profile |
| 44 | + export XMAKE_ROOT="y" |
| 45 | + xmake --version |
| 46 | + xrepo install -y protobuf-cpp |
| 47 | + ls -lrt |
| 48 | + export PATH=$HOME/.xmake/packages/p/protobuf-cpp/33.1/ef5a1f066f784334984fa37b1443301d/bin:$PATH |
| 49 | + python3 proto2yaml.py example/example.proto \ |
| 50 | + --namespace peak \ |
| 51 | + --server_class_name GrpcServer \ |
| 52 | + --client_class_name GrpcClient \ |
| 53 | + --include_grpc_files example.grpc.pb.h example.pb.h \ |
| 54 | + --out ./proto.yaml |
| 55 | + python3 cpp-grpc-auto-gen.py \ |
| 56 | + --proto proto.yaml \ |
| 57 | + --template ./template \ |
| 58 | + --out_server_file example/include/grpc_server.hpp \ |
| 59 | + --out_client_file example/include/grpc_client.hpp \ |
| 60 | + --format=clang-format |
| 61 | + cd example_project |
| 62 | + xmake build -j 16 |
| 63 | + xmake install -o . -v |
0 commit comments