Allow rulesets on legacy functions #631
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |