Build macosx-x86_64 dependencies #306
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: Build macosx-x86_64 dependencies | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Build macosx-aarch64 dependencies"] | |
branches: [main] | |
types: | |
- completed | |
# Prevent concurrent auto-commits | |
concurrency: | |
group: auto-commit-macosx-x86_64 | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- name: Install gcc | |
run: | | |
nix profile install nixpkgs#gcc | |
- uses: tree-sitter/setup-action@v1 | |
- name: Install Lua | |
uses: leso-kn/gh-actions-lua@master | |
with: | |
luaVersion: "5.1" | |
- name: Configure architecture | |
run: | | |
mkdir -p /Users/runner/.luarocks | |
luarocks config arch macosx-x86_64 | |
- name: Install Luarocks | |
uses: hishamhm/gh-actions-luarocks@master | |
with: | |
version: "3.11.1" | |
- name: Install `luarocks-build-treesitter-parser` Package | |
run: | | |
luarocks --verbose --local --lua-version=5.1 install luarocks-build-treesitter-parser | |
- name: Get tree-sitter-parsers.json | |
uses: actions/checkout@v4 | |
with: | |
repository: nvim-neorocks/nurr | |
sparse-checkout: | | |
tree-sitter-parsers.json | |
path: nurr | |
- name: Install tree-sitter parsers | |
run: | | |
langs=$(jq -r '.parsers[] | .lang' nurr/tree-sitter-parsers.json) | |
for lang in $langs; do | |
rm "tree-sitter-$lang-scm-1.macosx-x86_64.rock" || true | |
luarocks --local --dev --lua-version=5.1 install "tree-sitter-$lang" scm \ | |
&& luarocks pack "tree-sitter-$lang" \ | |
|| echo "tree-sitter-$lang has not been packaged yet" | |
done | |
- name: Install tree-sitter-nu | |
run: | | |
luarocks --local --dev --lua-version=5.1 install tree-sitter-nu scm | |
luarocks pack tree-sitter-nu | |
- name: Regenerate Manifests and HTML | |
run: luarocks-admin make-manifest --lua-version=5.1 . | |
- name: commit-macosx-x86_64 | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "chore: update macosx-x86_64 build artifacts" | |
file_pattern: "*.macosx-x86_64.rock *.all.rock manifest* index.html" |