Skip to content

Commit

Permalink
rewrite grammar building
Browse files Browse the repository at this point in the history
  • Loading branch information
panekj committed Jun 21, 2024
1 parent 8d946ef commit 2286bdb
Show file tree
Hide file tree
Showing 137 changed files with 1,603 additions and 1,119 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: Release

on:
schedule:
- cron: 0 0 */7 * *
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for release'
required: false
default: nightly
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+*"]
pull_request:

env:
Expand All @@ -25,16 +22,19 @@ jobs:
include:
- runs-on: windows-latest
artefact: windows-x86_64

- runs-on: ubuntu-latest
artefact: linux-x86_64

- runs-on: macos-14
artefact: macos-arm64

- runs-on: macos-13
artefact: macos-x86_64
env:
RELEASE_TAG_NAME: ${{ inputs.tag_name }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -45,23 +45,34 @@ jobs:
sudo apt-get -y install curl wget clang pkg-config
sudo update-alternatives --set cc /usr/bin/clang
- name: Update rust
run: rustup update

- name: Fetch dependencies
- name: Install tree-sitter-cli
run: |
cargo install --path ./build-tree-sitter --locked
cargo install tree-sitter-cli --locked
- uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Create tree-sitter-cli config
if: runner.os != 'Windows'
run: |
mkdir -p ~/.config/tree-sitter
echo '{"parser-directories": ["${{ github.workspace }}/grammars"]}' > ~/.config/tree-sitter/config.json
- name: Create tree-sitter-cli config
if: runner.os == 'Windows'
run: |
mkdir -Force ~/.config/tree-sitter
echo '{"parser-directories": ["${{ github.workspace }}\grammars"]}' > ~/.config/tree-sitter/config.json
- name: Build grammars
if: always()
run: |
build-tree-sitter --output ./output
run: python ./make.py

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: lapce-${{ matrix.artefact }}
name: ${{ matrix.artefact }}
path: |
output
retention-days: 1
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
**.lib
**.obj

**/target
/target
/output
/tmp
grammars/
.DS_Store

/.vscode
/.lapce
Loading

0 comments on commit 2286bdb

Please sign in to comment.