Skip to content

[windows CI] get protobuf binaries from external source #23

[windows CI] get protobuf binaries from external source

[windows CI] get protobuf binaries from external source #23

Workflow file for this run

# Build and push artifacts
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-push:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install LLVM
run: choco install -y llvm
- name: Install Ninja
run: choco install -y ninja
- name: Download protobuf
run: |
Invoke-WebRequest "https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-win64.zip" -OutFile protoc_x64-windows.zip
mkdir protoc_x64-windows
7z x protobuf_x64-windows.zip -oprotoc_x64-windows
Invoke-WebRequest "https://www.dropbox.com/scl/fi/te9p80zrzcwgswrkw21en/protobuf_x64-windows.zip?rlkey=btmzjokhh256xxns348o3re7m&dl=1" -OutFile protobuf_x64-windows.zip
7z x protobuf_x64-windows.zip
- name: CMake generate
shell: bash
env:
ARTIFACT_NAME: ppc2cpp-${{ runner.os }}
run: |
cmake -B build -GNinja \
-DCMAKE_INSTALL_PREFIX=$ARTIFACT_NAME \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DEXTERNAL_LIBPROTOBUF_PATH=protobuf_x64-windows \
-DEXTERNAL_PROTOC_PATH=protoc_x64-windows
ls .
ls protoc_x64-windows
ls protoc_x64-windows/bin
- name: Build
shell: bash
run: cmake --build build --target install --parallel
- uses: actions/upload-artifact@v3
if: github.ref == 'refs/heads/main' && github.repository == 'em-eight/ppc2cpp'
with:
name: ppc2cpp-${{ runner.os }}
path: ppc2cpp-${{ runner.os }}