Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial structure #1

Merged
merged 22 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "saturday"
79 changes: 79 additions & 0 deletions .github/workflows/build-reuse-unix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build Unix

# The caller is responsible for making sure all options passed to this workflow are valid and compatible with each other.

on:
workflow_call:
inputs:
ref:
required: false
default: ''
type: string
config:
required: false
default: 'Release'
type: string
# options:
# - Debug
# - Release
plat:
required: false
type: string
default: 'linux'
# options:
# - linux
# - android
# - ios
# - macos
os:
required: false
type: string
default: 'ubuntu-20.04'
# options:
# - ubuntu-20.04
# - ubuntu-22.04
# - macos-12
arch:
required: false
default: 'x64'
type: string
# options:
# - x86
# - x64
# - arm
# - arm64
clang:
required: false
default: ''
type: string

permissions: read-all

jobs:
build-unix-reuse:
name: Build
runs-on: ${{ inputs.os }}
container:
image: ${{ inputs.plat == 'linux' && format('ghcr.io/microsoft/msquic/linux-build-xcomp:{0}', inputs.os) || '' }}
steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
repository: microsoft/cxplat
ref: ${{ inputs.ref }}
- name: Set ownership
if: inputs.plat == 'linux'
run: |
# this is to fix GIT not liking owner of the checkout dir
chown -R $(id -u):$(id -g) $PWD
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 -ForBuild
- name: Build
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} ${{ inputs.clang }} -OneBranch
- name: Upload build artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.clang }}
path: artifacts
66 changes: 66 additions & 0 deletions .github/workflows/build-reuse-win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build WinUser

# The caller is responsible for making sure all options passed to this workflow are valid and compatible with each other.

on:
workflow_call:
inputs:
ref:
required: false
default: ''
type: string
config:
required: false
default: 'Release'
type: string
# options:
# - Debug
# - Release
plat:
required: false
type: string
default: 'windows'
# options:
# - windows
# - uwp
# - winkernel
os:
required: false
type: string
default: 'windows-2019'
# options:
# - windows-2019
# - windows-2022
arch:
required: false
default: 'x64'
type: string
# options:
# - x86
# - x64
# - arm64

permissions: read-all

jobs:
build-windows-reuse:
if: inputs.plat == 'windows' || inputs.plat == 'uwp'
name: Build
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
repository: microsoft/cxplat
ref: ${{ inputs.ref }}
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 -ForBuild
- name: Build
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }}
- name: Upload build artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}
path: artifacts
65 changes: 65 additions & 0 deletions .github/workflows/build-reuse-winkernel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build WinKernel

# The caller is responsible for making sure all options passed to this workflow are valid and compatible with each other.

on:
workflow_call:
inputs:
ref:
required: false
default: ''
type: string
config:
required: false
default: 'Release'
type: string
# options:
# - Debug
# - Release
plat:
required: false
type: string
default: 'winkernel'
# options:
# - winkernel
os:
required: false
type: string
default: 'windows-2019'
# options:
# - windows-2019
# - windows-2022
arch:
required: false
default: 'x64'
type: string
# options:
# - x86
# - x64
# - arm64

permissions: read-all

jobs:
build-windows-kernel-reuse:
name: Build
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
repository: microsoft/cxplat
ref: ${{ inputs.ref }}
- name: Prepare Machine
shell: pwsh
run: scripts/prepare-machine.ps1 -ForBuild
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce
- name: Build
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }}
- name: Upload build artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}
path: artifacts
115 changes: 115 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*

concurrency:
# Cancel any workflow currently in progress for the same PR.
# Allow running concurrently with any other commits.
group: build-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

permissions: read-all

jobs:
build-windows:
name: WinUser
needs: []
strategy:
fail-fast: false
matrix:
config: ['Debug', 'Release']
plat: [windows] # TODO: Support uwp, gamecore_console
os: ['windows-2022']
arch: [x86, x64, arm64]
uses: ./.github/workflows/build-reuse-win.yml
with:
config: ${{ matrix.config }}
plat: ${{ matrix.plat }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}

build-windows-kernel:
name: WinKernel
needs: []
strategy:
fail-fast: false
matrix:
config: ['Debug', 'Release']
plat: [winkernel]
os: ['windows-2022']
arch: [x64, arm64]
uses: ./.github/workflows/build-reuse-winkernel.yml
with:
config: ${{ matrix.config }}
plat: ${{ matrix.plat }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}

build-ubuntu-cross-compile:
name: UbuntuArm
needs: []
strategy:
fail-fast: false
matrix:
config: ['Debug', 'Release']
plat: [linux]
os: ['ubuntu-20.04', 'ubuntu-22.04']
arch: [arm, arm64]
uses: ./.github/workflows/build-reuse-unix.yml
with:
config: ${{ matrix.config }}
plat: ${{ matrix.plat }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}

build-ubuntu:
name: Ubuntu
needs: []
strategy:
fail-fast: false
matrix:
config: ['Debug', 'Release']
plat: [linux, android]
os: ['ubuntu-20.04', 'ubuntu-22.04']
arch: [x86, x64]
clang: ['', '-Clang']
exclude:
# Android doesn't support x86
- plat: android
arch: x86
# Android doesn't use Clang
- plat: android
clang: '-Clang'
uses: ./.github/workflows/build-reuse-unix.yml
with:
config: ${{ matrix.config }}
plat: ${{ matrix.plat }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
clang: ${{ matrix.clang }}

build-darwin:
name: MacOs
needs: []
strategy:
fail-fast: false
matrix:
config: ['Debug', 'Release']
plat: [macos, ios]
os: ['macos-12']
arch: [x64, arm64]
uses: ./.github/workflows/build-reuse-unix.yml
with:
config: ${{ matrix.config }}
plat: ${{ matrix.plat }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
Loading
Loading