Files
rea/.github/workflows/ci.yml
T

103 lines
4.3 KiB
YAML

name: Experimental Windows volume-root share red-green
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: windows-root-share-red-green-${{ github.run_id }}
cancel-in-progress: false
jobs:
build-native-pair:
name: Build ${{ matrix.variant }} native artifact
runs-on: ubuntu-24.04
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
variant: [baseline, fixed]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
ref: ${{ matrix.variant == 'baseline' && 'bb49252523d13c48e6d3fb7c4cfd5f95400fcd53' || github.sha }}
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: .nvmrc
- name: Prepare cross compiler
run: |
for source in /etc/apt/apt-mirrors.txt /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu.sources; do
if [ -f "$source" ]; then
sudo sed -i 's|azure.archive.ubuntu.com|archive.ubuntu.com|g; s|http://archive.ubuntu.com|https://archive.ubuntu.com|g' "$source"
fi
done
sudo apt-get update
sudo apt-get install --no-install-recommends -y g++-mingw-w64-x86-64
- run: npm run build:windows-native
- run: npm run verify:windows-native:artifact
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: windows-root-share-native-${{ matrix.variant }}
path: native/windows/build/
if-no-files-found: error
- name: Build process boundary lease fixture
if: matrix.variant == 'fixed'
run: |
mkdir -p .cache/windows-process-boundary
x86_64-w64-mingw32-g++ -municode -std=c++17 -O2 -static -Wall -Wextra \
-o .cache/windows-process-boundary/process-boundary.exe \
tests/fixtures/windows/processBoundary.cc -ladvapi32
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: matrix.variant == 'fixed'
with:
name: windows-root-share-process-boundary
path: .cache/windows-process-boundary/
if-no-files-found: error
verify-native-pair:
name: Verify ${{ matrix.variant }} artifact on Windows x64
needs: build-native-pair
runs-on: windows-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
variant: [baseline, fixed]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
ref: ${{ matrix.variant == 'baseline' && 'bb49252523d13c48e6d3fb7c4cfd5f95400fcd53' || github.sha }}
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: .nvmrc
- run: npm ci
- run: npm run build:cached
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: windows-root-share-native-${{ matrix.variant }}
path: native/windows/build/
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: windows-root-share-process-boundary
path: .cache/windows-process-boundary/
- run: npm run verify:windows-native:artifact
- name: Checkout fixed-source probe helper
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
ref: ${{ github.sha }}
path: .cache/windows-root-share-harness
- name: Assert baseline fails specifically with Win32 sharing violation 32
if: matrix.variant == 'baseline'
run: >-
node .cache/windows-root-share-harness/scripts/verify-windows-root-share-experiment.mjs
. .cache/windows-process-boundary/process-boundary.exe expect-denial
- name: Assert fixed admission succeeds, then run full native boundary suite
if: matrix.variant == 'fixed'
run: |
node .cache/windows-root-share-harness/scripts/verify-windows-root-share-experiment.mjs `
. .cache/windows-process-boundary/process-boundary.exe allow
npm run verify:windows-native -- . `
"${{ github.workspace }}\.cache\windows-process-boundary\process-boundary.exe"