Skip to content

Small Improvement on GCD (#77) #444

Small Improvement on GCD (#77)

Small Improvement on GCD (#77) #444

Workflow file for this run

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@v3
# 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
# 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
# Test
- name: Test
if: matrix.arch == 'x64' || matrix.arch == 'x86'
run: make test
# Upload
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Binaries (${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cpurev }})
path: |
./build/make/bin/win-${{ matrix.arch }}/*.exe
./build/make/bin/win-${{ matrix.arch }}/*.dll
./build/make/bin/win-${{ matrix.arch }}/*.pdb
###########################################################################
dist:
needs: build
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [windows-2022]
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v3
# Download X64 Build
- name: Download X64 Build
uses: actions/download-artifact@v3
with:
name: Binaries (${{ matrix.os }}-x64-default)
path: ./build/make/bin/win-x64/
# Download X86 Build
- name: Download X86 Build
uses: actions/download-artifact@v3
with:
name: Binaries (${{ matrix.os }}-x86-default)
path: ./build/make/bin/win-x86/
# Download ARM64 Build
- name: Download ARM64 Build
uses: actions/download-artifact@v3
with:
name: Binaries (${{ matrix.os }}-arm64-default)
path: ./build/make/bin/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 }}
# Upload
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Packages (${{ matrix.os }})
path: |
./dist/win-10/*.appxbundle
./dist/win-10/*.appxupload
# Upload to Github Release
- name: Upload to Github Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.PAT_GITHUB_ACTIONS }}
files: ./dist/win-10/*.appxbundle