fix tcp socket options not derived from listener socket on linux (#97) #553
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Windows | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- '*' | |
jobs: | |
########################################################################### | |
build: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
MODE: release | |
TARGET_OS: win | |
TARGET_ARCH: ${{ matrix.arch }} | |
TARGET_CPUREV: ${{ matrix.cpurev }} | |
JOBS: 4 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2019,windows-2022] | |
arch: [x64,x86,arm64] | |
cpurev: [legacy, default, modern] | |
steps: | |
# Checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Upgrade LLVM | |
#- name: Upgrade LLVM | |
# run: choco upgrade llvm -y | |
# Developer Console (X64) | |
- name: MSVC Developer Console (X64) | |
if: matrix.arch == 'x64' | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64 | |
# Developer Console (X86) | |
- name: MSVC Developer Console (X86) | |
if: matrix.arch == 'x86' | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64_x86 | |
# Developer Console (ARM64) | |
- name: MSVC Developer Console (ARM64) | |
if: matrix.arch == 'arm64' | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64_arm64 | |
# Clang Version | |
- name: Clang Version | |
run: clang --version | |
# Build | |
- name: Build | |
run: | | |
make -j${{ env.JOBS }} | |
# Binary Info | |
- name: Binary Info | |
run: | | |
dumpbin /dependents /exports ./build/make/bin/win-${{ env.TARGET_ARCH }}/CppCore.Example.Server.exe | |
dumpbin /dependents /exports ./build/make/bin/win-${{ env.TARGET_ARCH }}/CppCore.Example.Client.exe | |
dumpbin /dependents /exports ./build/make/bin/win-${{ env.TARGET_ARCH }}/CppCore.Example.UI.exe | |
dumpbin /dependents /exports ./build/make/bin/win-${{ env.TARGET_ARCH }}/CppCore.Test.exe | |
dumpbin /dependents /exports ./build/make/bin/win-${{ env.TARGET_ARCH }}/CppCore.Debug.exe | |
dumpbin /dependents /exports ./build/make/lib/win-${{ env.TARGET_ARCH }}/libcppcore.dll | |
# PDB Info | |
- name: PDB Info | |
run: | | |
echo CppCore.Example.Server | |
llvm-pdbutil dump --summary ./build/make/bin/win-${{ env.TARGET_ARCH }}/CppCore.Example.Server.pdb | |
echo CppCore.Example.Client | |
llvm-pdbutil dump --summary ./build/make/bin/win-${{ env.TARGET_ARCH }}/CppCore.Example.Client.pdb | |
echo CppCore.Example.UI | |
llvm-pdbutil dump --summary ./build/make/bin/win-${{ env.TARGET_ARCH }}/CppCore.Example.UI.pdb | |
echo CppCore.Test | |
llvm-pdbutil dump --summary ./build/make/bin/win-${{ env.TARGET_ARCH }}/CppCore.Test.pdb | |
echo CppCore.Debug | |
llvm-pdbutil dump --summary ./build/make/bin/win-${{ env.TARGET_ARCH }}/CppCore.Debug.pdb | |
echo CppCore.Interface.C | |
llvm-pdbutil dump --summary ./build/make/lib/win-${{ env.TARGET_ARCH }}/libcppcore.pdb | |
# Test | |
- name: Test | |
if: matrix.arch == 'x64' || matrix.arch == 'x86' | |
run: make test | |
# Upload Binaries | |
- name: Upload Binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Binaries (${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cpurev }}) | |
path: | | |
./build/make/bin/win-${{ matrix.arch }}/*.exe | |
./build/make/bin/win-${{ matrix.arch }}/*.pdb | |
# Upload Libraries | |
- name: Upload Libraries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Libraries (${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cpurev }}) | |
path: | | |
./build/make/lib/win-${{ matrix.arch }}/*.dll | |
./build/make/lib/win-${{ matrix.arch }}/*.lib | |
./build/make/lib/win-${{ matrix.arch }}/*.pdb | |
########################################################################### | |
dist: | |
needs: build | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
env: | |
JOBS: 4 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022] | |
cpurev: [legacy, default, modern] | |
steps: | |
# Checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Download X64 Binaries | |
- name: Download X64 Binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: Binaries (${{ matrix.os }}-x64-${{ matrix.cpurev }}) | |
path: ./build/make/bin/win-x64/ | |
# Download X64 Libraries | |
- name: Download X64 Libraries | |
uses: actions/download-artifact@v4 | |
with: | |
name: Libraries (${{ matrix.os }}-x64-${{ matrix.cpurev }}) | |
path: ./build/make/lib/win-x64/ | |
# Download X86 Binaries | |
- name: Download X86 Binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: Binaries (${{ matrix.os }}-x86-${{ matrix.cpurev }}) | |
path: ./build/make/bin/win-x86/ | |
# Download X86 Libraries | |
- name: Download X86 Libraries | |
uses: actions/download-artifact@v4 | |
with: | |
name: Libraries (${{ matrix.os }}-x86-${{ matrix.cpurev }}) | |
path: ./build/make/lib/win-x86/ | |
# Download ARM64 Binaries | |
- name: Download ARM64 Binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: Binaries (${{ matrix.os }}-arm64-${{ matrix.cpurev }}) | |
path: ./build/make/bin/win-arm64/ | |
# Download ARM64 Libraries | |
- name: Download ARM64 Libraries | |
uses: actions/download-artifact@v4 | |
with: | |
name: Libraries (${{ matrix.os }}-arm64-${{ matrix.cpurev }}) | |
path: ./build/make/lib/win-arm64/ | |
# Developer Console (X64) | |
- name: MSVC Developer Console (X64) | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64 | |
# Load Code Signing Certificate | |
- name: Load Code Signing Certificate | |
shell: pwsh | |
env: | |
PFX_BASE64: ${{ secrets.SIGN_PFX_FILE }} | |
run: | | |
echo $env:PFX_BASE64 > ./certs/TrueCert.pfx.base64 | |
certutil -decode ./certs/TrueCert.pfx.base64 ./certs/TrueCert.pfx | |
# Pack | |
- name: Make (dist) | |
env: | |
SIGN_PFX_FILE: ../../certs/TrueCert.pfx | |
SIGN_PFX_PASS: ${{ secrets.SIGN_PFX_PASS }} | |
PUBLISHERCN: Clint Banzhaf | |
PUBLISHER: CN=Clint Banzhaf, O=Clint Banzhaf, S=Baden-Württemberg, C=DE | |
run: | | |
make dist -j${{ env.JOBS }} | |
# Install Python | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
# Install Python Packages | |
- name: Install Python Packages | |
run: | | |
python --version | |
python -m pip install build | |
python -m pip install pytest crc32c pbkdf2-reboot | |
# Python Wheel (x64) | |
- name: Python Wheel (x64) | |
run: make TARGET_ARCH=x64 CppCore.Interface.Python | |
# Test Python | |
- name: Test Python | |
run: | | |
cd src/CppCore.Interface.Python | |
pytest | |
# Python Wheel (x86) | |
- name: Python Wheel (x86) | |
run: make TARGET_ARCH=x86 CppCore.Interface.Python | |
# Python Wheel (arm64) | |
- name: Python Wheel (arm64) | |
run: make TARGET_ARCH=arm64 CppCore.Interface.Python | |
# Upload | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Packages (${{ matrix.os }}-${{ matrix.cpurev }}) | |
path: | | |
./dist/win-10/*.appxbundle | |
./dist/win-10/*.appxupload | |
./dist/win-10/*.zip | |
./dist/win-10/*.whl | |
# Upload to Github Release | |
- name: Upload to Github Release | |
uses: softprops/action-gh-release@v1 | |
if: matrix.cpurev == 'default' && startsWith(github.ref, 'refs/tags/') | |
with: | |
token: ${{ secrets.PAT_GITHUB_ACTIONS }} | |
files: | | |
./dist/win-10/*.appxbundle | |
./dist/win-10/*.zip |