Skip to content

docker multistage build for xdp support #2

docker multistage build for xdp support

docker multistage build for xdp support #2

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
tls:
required: false
default: 'openssl'
type: string
# options:
# - openssl
# - openssl3
static:
required: false
default: ''
type: string
systemcrypto:
required: false
default: ''
type: string
clang:
required: false
default: ''
type: string
codecheck:
required: false
default: ''
type: string
sanitize:
required: false
default: ''
type: string
build:
required: false
default: '' # Empty string means build all
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}-{1}', inputs.os, inputs.arch == 'x64' || inputs.arch == 'x86' ? 'x86_64' : 'arm') || '' }}

Check failure on line 84 in .github/workflows/build-reuse-unix.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-reuse-unix.yml

Invalid workflow file

You have an error in your yaml syntax on line 84
steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
repository: microsoft/msquic
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 ${{ inputs.plat == 'linux' && '-ForContainerBuild' || '-ForBuild' }} -Tls ${{ inputs.tls }}
- name: Build For Test
if: inputs.build == '-Test'
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisablePerf ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} -OneBranch
- name: Build For Perf
if: inputs.build == '-Perf'
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisableTools -DisableTest ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }}
- name: Build
if: inputs.build == ''
shell: pwsh
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} -OneBranch
- name: Upload build artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.static }}${{ inputs.clang }}${{ inputs.systemcrypto }}${{ inputs.codecheck }}${{ inputs.sanitize }}${{ inputs.build }}
path: artifacts