Repository navigation
51 lines (48 loc) · 2.1 KB
/
Copy pathbuild-native.yml
File metadata and controls
51 lines (48 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build native
# Produces the diffengine_viewer binaries committed under
# src/DiffEngineViewer.{Linux,Mac}/runtimes/{rid}/native, in the head that loads them. There is no
# Windows equivalent: that head renders with WinForms.
#
# They are committed rather than built during a normal build so that a plain
# `dotnet build src --configuration Release` produces a shippable package on any machine, and
# contributors never need a C++ toolchain. Run this whenever native/ changes.
#
# The work is PlatformHeads' build-native workflow, which this one was moved into so that
# BuildMonitor, built the same way, runs it too: the Linux library built in a manylinux_2_28
# container and checked for the glibc it needs and the libraries it records as needed, the
# universal dylib, and the pull request with the binaries. BuildMonitor had a copy of it, and
# three fixes made here were waiting to be found again there.
# The tag is the one native/CMakeLists.txt fetches and Directory.Packages.props names.
on:
push:
paths:
- 'native/**'
- '.github/workflows/build-native.yml'
pull_request:
paths:
- 'native/**'
workflow_dispatch:
inputs:
commit:
description: 'Open a PR with the rebuilt binaries'
type: boolean
default: true
concurrency:
group: build-native-${{ github.ref }}
cancel-in-progress: true
jobs:
native:
uses: SimonCropp/PlatformHeads/.github/workflows/build-native.yml@0.2.0
permissions:
contents: write
pull-requests: write
with:
library: diffengine_viewer
linux-runtimes: src/DiffEngineViewer.Linux/runtimes
swift-package: native/swift
mac-runtimes: src/DiffEngineViewer.Mac/runtimes
# Also on push, not just manual dispatch. workflow_dispatch does not appear in the Actions
# UI until the workflow is on the default branch, so on a feature branch a push is the only
# way to trigger this, and leaving the binaries as bare artifacts to copy by hand is worse.
propose: ${{ github.event_name != 'workflow_dispatch' || inputs.commit }}
pull-request-title: Rebuild native renderer binaries