Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
csujedihy committed Jun 23, 2023
1 parent b484c06 commit 84e637d
Show file tree
Hide file tree
Showing 2 changed files with 252 additions and 0 deletions.
127 changes: 127 additions & 0 deletions .github/workflows/build-helper-unix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Build Windows

on:
workflow_dispatch:
workflow_call:
inputs:
config:
required: false
default: 'Release'
options:
- Debug
- Release
plat:
required: false
type: choice
default: 'linux'
options:
- linux
- android
- ios
- macos
os:
required: false
type: choice
default: 'windows-2019'
options:
- ubuntu-20.04
- ubuntu-22.04
- macos-12
arch:
required: false
default: 'x64'
type: choice
options:
- x86
- x64
- arm64
tls:
required: false
default: 'schannel'
type: choice
options:
- openssl
- openssl3
- schannel
xdp:
required: false
default: ''
type: string
sanitize:
required: false
default: ''
type: string
static:
required: false
default: ''
type: string
test:
required: false
default: ''
type: string

permissions: read-all

jobs:
build-windows:
if: inputs.plat == 'windows' || inputs.plat == 'uwp'
name: User Mode
needs: []
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0
- name: Install Perl
uses: shogo82148/actions-setup-perl@0bb5af61b3945a80585229183e7ac50a97d7996c
with:
perl-version: '5.34'
- name: Install NASM
uses: ilammy/setup-nasm@321e6ed62a1fc77024a3bd853deb33645e8b22c4
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 -ForBuild -Tls ${{ inputs.tls }}
- name: Build For Test
if: inputs.test == true
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisableTools -DisablePerf -DynamicCRT ${{ inputs.xdp }} ${{ inputs.sanitize }}
- name: Build
if: inputs.test == false
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} ${{ inputs.xdp }} ${{ inputs.sanitize }} ${{ inputs.static }}
- name: Upload build artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.xdp }}${{ inputs.sanitize }}${{ inputs.static }}
path: artifacts

build-windows-kernel:
if: inputs.plat == 'winkernel'
name: Kernel Mode
needs: []
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 -ForBuild -ForKernel
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c
- name: Nuget Restore
shell: pwsh
run: msbuild msquic.kernel.sln -t:restore /p:RestorePackagesConfig=true /p:Configuration=${{ inputs.config }} /p:Platform=${{ inputs.arch }}
- name: Build
shell: pwsh
run: msbuild msquic.kernel.sln /p:Configuration=${{ inputs.config }} /p:Platform=${{ inputs.arch }} /p:QUIC_VER_SUFFIX=-official
- name: Sign Kernel
shell: pwsh
run: scripts/sign.ps1 -Config ${{ inputs.config }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }}
- name: Upload build artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}
path: artifacts
125 changes: 125 additions & 0 deletions .github/workflows/build-helper-win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Build Windows

on:
workflow_dispatch:
workflow_call:
inputs:
config:
required: false
default: 'Release'
options:
- Debug
- Release
plat:
required: false
type: choice
default: 'windows'
options:
- windows
- uwp
- winkernel
os:
required: false
type: choice
default: 'windows-2019'
options:
- windows-2019
- windows-2022
arch:
required: false
default: 'x64'
type: choice
options:
- x86
- x64
- arm64
tls:
required: false
default: 'schannel'
type: choice
options:
- openssl
- openssl3
- schannel
xdp:
required: false
default: ''
type: string
sanitize:
required: false
default: ''
type: string
static:
required: false
default: ''
type: string
test:
required: false
default: ''
type: string

permissions: read-all

jobs:
build-windows:
if: inputs.plat == 'windows' || inputs.plat == 'uwp'
name: User Mode
needs: []
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0
- name: Install Perl
uses: shogo82148/actions-setup-perl@0bb5af61b3945a80585229183e7ac50a97d7996c
with:
perl-version: '5.34'
- name: Install NASM
uses: ilammy/setup-nasm@321e6ed62a1fc77024a3bd853deb33645e8b22c4
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 -ForBuild -Tls ${{ inputs.tls }}
- name: Build For Test
if: inputs.test == true
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisableTools -DisablePerf -DynamicCRT ${{ inputs.xdp }} ${{ inputs.sanitize }}
- name: Build
if: inputs.test == false
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} ${{ inputs.xdp }} ${{ inputs.sanitize }} ${{ inputs.static }}
- name: Upload build artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.xdp }}${{ inputs.sanitize }}${{ inputs.static }}
path: artifacts

build-windows-kernel:
if: inputs.plat == 'winkernel'
name: Kernel Mode
needs: []
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 -ForBuild -ForKernel
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c
- name: Nuget Restore
shell: pwsh
run: msbuild msquic.kernel.sln -t:restore /p:RestorePackagesConfig=true /p:Configuration=${{ inputs.config }} /p:Platform=${{ inputs.arch }}
- name: Build
shell: pwsh
run: msbuild msquic.kernel.sln /p:Configuration=${{ inputs.config }} /p:Platform=${{ inputs.arch }} /p:QUIC_VER_SUFFIX=-official
- name: Sign Kernel
shell: pwsh
run: scripts/sign.ps1 -Config ${{ inputs.config }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }}
- name: Upload build artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}
path: artifacts

0 comments on commit 84e637d

Please sign in to comment.