Skip to content

refactor: enable PIC #13

refactor: enable PIC

refactor: enable PIC #13

Workflow file for this run

name: Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: 'Build: ${{ matrix.target.platform }}-${{ matrix.target.arch }}'
strategy:
fail-fast: false
matrix:
target:
- platform: win32
arch: x64
os: windows-2022
generateArgs: -G "Visual Studio 17 2022" -A x64 -T v143
buildArgs: ''
- platform: win32
arch: ia32
os: windows-2022
generateArgs: -G "Visual Studio 17 2022" -A Win32 -T v143
buildArgs: ''
- platform: win32
arch: arm
os: windows-2022
generateArgs: -G "Visual Studio 17 2022" -A ARM -T v143
buildArgs: ''
- platform: win32
arch: arm64
os: windows-2022
generateArgs: -G "Visual Studio 17 2022" -A ARM64 -T v143
buildArgs: ''
- platform: linux
arch: x64
os: ubuntu-20.04
generateArgs: -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_FLAGS=-m64
buildArgs: ''
- platform: linux
arch: ia32
os: ubuntu-20.04
generateArgs: -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32
buildArgs: ''
- platform: linux
arch: arm64
os: ubuntu-20.04
generateArgs: ''
buildArgs: ''
- platform: darwin
arch: x64
os: macos-11
generateArgs: -DCMAKE_OSX_ARCHITECTURES=x86_64
buildArgs: ''
- platform: darwin
arch: ia32
os: macos-11
generateArgs: -DCMAKE_OSX_ARCHITECTURES=i386
buildArgs: ''
- platform: darwin
arch: arm64
os: macos-11
generateArgs: ''
buildArgs: ''
runs-on: ${{ matrix.target.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Build
env:
LIBPROTOBUF_PREBUILT_GENERATE_ARGS: ${{ matrix.target.generateArgs }}
LIBPROTOBUF_PREBUILT_BUILD_ARGS: ${{ matrix.target.buildArgs }}
run: ./build.sh
shell: bash
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: libprotobuf-prebuilt-${{ matrix.target.platform }}-${{ matrix.target.arch }}-${{ github.sha }}
path: protobuf/cmake/build
compression-level: 9