Skip to content

ci: rename output files, no longer use docker #12

ci: rename output files, no longer use docker

ci: rename output files, no longer use docker #12

Workflow file for this run

name: Build
on:
push:
branches: [master]
jobs:
windows-x86_64:
name: Build for Windows
runs-on: windows-latest
strategy:
matrix:
editor:
- name: lite-xl
make_opts: "'LTS_CFLAGS=-std=c11'"
- name: pragtical
make_opts: "'LTS_CFLAGS=-std=c11 -DPRAGTICAL'"
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
base-devel
git
mingw-w64-x86_64-gcc
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: >-
sh make.sh lua_tree_sitter.dll ${{ matrix.editor.make_opts }} &&
mv lua-tree-sitter/lua_tree_sitter.dll init.dll
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.editor.name }}-tree-sitter-x86_64-windows
path: init.dll
if-no-files-found: error
linux:
name: Build for Linux
runs-on: ubuntu-latest
strategy:
matrix:
editor:
- name: lite-xl
make_opts: "'LTS_CFLAGS=-std=c11'"
- name: pragtical
make_opts: "'LTS_CFLAGS=-std=c11 -DPRAGTICAL'"
arch:
- name: x86_64
pkg:
cc: gcc
- name: aarch64
pkg: gcc-aarch64-linux-gnu
cc: aarch64-linux-gnu-gcc
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install cc
run: sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get install make ${{ matrix.arch.cc }}
- name: Build
run: >-
sh make.sh lua_tree_sitter.so CC=${{ matrix.arch.cc }} ${{ matrix.editor.make_opts }} &&
mv lua-tree-sitter/lua_tree_sitter.so init.so
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.editor.name }}-tree-sitter-${{ matrix.arch.name }}-linux
path: init.so
if-no-files-found: error
macos:
name: Build for MacOS
runs-on: macos-latest
strategy:
matrix:
editor:
- name: lite-xl
make_opts: "'LTS_CFLAGS=-std=c11'"
- name: pragtical
make_opts: "'LTS_CFLAGS=-std=c11 -DPRAGTICAL'"
arch:
- name: x86_64
make_opts: "'CFLAGS=-O3 -fvisibility=hidden -fPIC -flto=auto -target x86_64-apple-darwin'"
- name: aarch64
make_opts: "'CFLAGS=-O3 -fvisibility=hidden -fPIC -flto=auto -target aarch64-apple-darwin'"
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
run: >-
bash make.sh lua_tree_sitter.so ${{ matrix.arch.make_opts }} ${{ matrix.editor.make_opts }} &&
mv lua-tree-sitter/lua_tree_sitter.so init.so
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.editor.name }}-tree-sitter-${{ matrix.arch.name }}-darwin
path: init.so
if-no-files-found: error