Repository navigation
126 lines (104 loc) · 3.53 KB
/
Copy pathbuild_libraries.yml
File metadata and controls
126 lines (104 loc) · 3.53 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Build Host C++ / Python Libraries
on:
pull_request:
branches: [main]
# ready_for_review is included so that marking a draft PR "Ready for
# review" triggers a build (the draft guard below skips draft PRs);
# it is not in GitHub's default set (opened/synchronize/reopened).
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: [main]
release:
types: [published]
workflow_dispatch:
# Least-privilege default: these jobs only check out the repo and build/upload
# artifacts, so read-only access to repository contents is sufficient.
permissions:
contents: read
# Supersede in-progress runs: a new commit on the same PR cancels the earlier,
# now-stale build. Keyed by the workflow (so it never cross-cancels other
# workflows) + the PR number, which is globally unique - unlike the head branch
# name, two fork PRs can't collide on it. For non-PR events (push, release) we
# fall back to github.run_id, which is unique per run, so those runs each get
# their own group and never serialize or cancel each other.
# cancel-in-progress is gated to pull_request events only so that push-to-main
# (and release) runs are never cancelled.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build_windows:
# Skip build CI for draft PRs; still runs on push-to-main and non-draft PRs.
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: windows-latest
continue-on-error: false
steps:
- name: Checkout repo
uses: actions/checkout@v7
with:
submodules: 'recursive'
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Build libraries
working-directory: lib/
run: ./build.ps1
- name: Upload output folder
uses: actions/upload-artifact@v7
with:
name: libespp_windows
path: install
build_linux:
# Skip build CI for draft PRs; still runs on push-to-main and non-draft PRs.
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout repo
uses: actions/checkout@v7
with:
submodules: 'recursive'
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Build libraries
working-directory: lib/
run: |
./build.sh
- name: Upload output folder
uses: actions/upload-artifact@v7
with:
name: libespp_linux
path: install
build_macos:
# Skip build CI for draft PRs; still runs on push-to-main and non-draft PRs.
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: macos-latest
continue-on-error: false
steps:
- name: Setup XCode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Checkout repo
uses: actions/checkout@v7
with:
submodules: 'recursive'
fetch-depth: 0
- name: Build libraries
working-directory: lib/
run: |
./build.sh
- name: Upload output folder
uses: actions/upload-artifact@v7
with:
name: libespp_macos
path: install