Skip to content

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

[windows CI] get protobuf binaries from external source

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

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
if: runner.os == 'Windows'
- 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
dir
mkdir protoc_x64-windows
7z x protobuf_x64-windows.zip -oprotoc_x64-windows
dir
Invoke-WebRequest "https://www.dropbox.com/scl/fi/te9p80zrzcwgswrkw21en/protobuf_x64-windows.zip?rlkey=btmzjokhh256xxns348o3re7m&dl=1" -OutFile protobuf_x64-windows.zip
dir
7z x protobuf_x64-windows.zip
dir
- name: CMake generate
env:
ARTIFACT_NAME: ppc2cpp-${{ runner.os }}
run: |
cmake --version
cmake -B build \
-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 \
shell: bash
- name: Build
run: cmake --build build --target install -j
- 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 }}