-
Notifications
You must be signed in to change notification settings - Fork 12
90 lines (73 loc) · 2.35 KB
/
Copy pathbuild.yaml
File metadata and controls
90 lines (73 loc) · 2.35 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
name: Build LSL definitions
on:
pull_request:
push:
branches: [main]
tags: [v*]
jobs:
validate-lsl-definitions-via-jsonschema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[validate]"
- name: Validate LSL definitions via jsonschema
run: |
# Run command to check the lsl_definitions against the schema file, to verify it's valid
validate-lsl-definitions-via-jsonschema
echo "✓ Definitions file matches schema"
build:
needs: validate-lsl-definitions-via-jsonschema
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install python package
run: pip install -e .
# Needed because some of the generated files intentionally aren't
# tracked in the repo, since they're not easily diffable.
- name: Generate files
run: bash ./gen_all_definitions.sh
- uses: secondlife/action-autobuild@v5
with:
platform: common
# The generated files should already be correct per the pre-commit hooks.
# We don't need to generate them again to zip them.
- name: Create zip
run: |
cp -r generated to_package
rm -rf "to_package/templated"
rm -rf "to_package/cpp"
cp LICENSE "to_package/"
cd to_package && zip -r ../lsl-definitions.zip .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: lsl-definitions
path: lsl-definitions.zip
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v6
- name: Download zip artifact
uses: actions/download-artifact@v4
with:
name: lsl-definitions
- name: Upload zip to release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ github.ref_name }} lsl-definitions.zip
- uses: secondlife/action-autobuild-release@v3
with:
public: true