fix: broken type checks as of Live 12.1 #8
Workflow file for this run
This file contains 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: validate | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
release: | |
types: [published] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: libasound2-dev | |
version: 1.0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
cache: pip | |
- run: python -m pip install poetry | |
- run: make install | |
- run: make lint | |
check-types: | |
runs-on: macos-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
cache: pip | |
- run: python -m pip install poetry | |
- run: make install | |
# LLM_TODO: The above cacheable actions create and populate the | |
# "__ext__/System_MIDIRemoteScripts/" directory. This content can be cached based | |
# on the Ableton Live version, which can be retrieved using `brew info --cask | |
# --json=v2 ableton-live-lite | jq -r '.casks[0].version'`. Rewrite the actions so | |
# that they only run if necessary, and cache the generated decompilation | |
# directory between runs. | |
# We can cache the decompiled remote scripts based on the Live version, to avoid | |
# the expensive installation/decompilation process if possible. | |
- name: Get Ableton Live version | |
id: get-ableton-live-version | |
run: echo "version=$(brew info --cask --json=v2 ableton-live-lite | jq -r '.casks[0].version')" >> $GITHUB_OUTPUT | |
- name: Cache Ableton Live decompilation | |
uses: actions/cache@v3 | |
id: cache-decompilation | |
with: | |
path: __ext__/System_MIDIRemoteScripts/ | |
key: ableton-live-decompilation-${{ steps.get-ableton-live-version.outputs.version }} | |
- name: Install Ableton Live | |
if: steps.cache-decompilation.outputs.cache-hit != 'true' | |
run: brew install --cask ableton-live-lite | |
- name: Decompile system remote scripts libraries | |
if: steps.cache-decompilation.outputs.cache-hit != 'true' | |
run: make decompile | |
# Run the command manually (not using `make`) to avoid failures if Live isn't installed. | |
- run: poetry run pyright . | |
release: | |
name: Publish release to GitHub | |
runs-on: ubuntu-latest | |
concurrency: release | |
environment: | |
name: release | |
if: github.event_name == 'push' | |
# Make sure everything else succeeds before releasing. | |
needs: | |
- lint | |
- check-types | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Semantic Release | |
uses: python-semantic-release/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |