-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (89 loc) · 3.55 KB
/
build-macosx-aarch64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build macosx-aarch64 dependencies
on:
workflow_dispatch:
workflow_run:
workflows: ["Build linux-x86_64 dependencies"]
branches: [main]
types:
- completed
# Prevent concurrent auto-commits
concurrency:
group: auto-commit-macosx-aarch64
cancel-in-progress: true
jobs:
build:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Install C/C++ Compiler
uses: rlalik/setup-cpp-compiler@master
with:
compiler: clang-latest
- name: Install Rust Toolchain (macos)
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: "-C link-arg=-undefined -C link-arg=dynamic_lookup"
- name: Install Lua
uses: leso-kn/gh-actions-lua@master
with:
luaVersion: "5.1"
- name: Install Luarocks
uses: hishamhm/gh-actions-luarocks@master
- name: Print environment
run: |
printenv
- name: Install `LuaFileSystem` Package
run: |
luarocks --verbose --local --lua-version=5.1 install luafilesystem
luarocks --verbose pack luafilesystem
- name: Install `luarocks-build-rust-mlua` Package
run: |
luarocks --verbose --local --lua-version=5.1 install luarocks-build-rust-mlua
luarocks --verbose pack luarocks-build-rust-mlua
- name: Install TOML Package
run: |
luarocks --verbose --local --lua-version=5.1 install toml
luarocks --verbose pack toml
- name: Install `toml-edit` Package
run: |
luarocks --verbose --local --lua-version=5.1 install toml-edit
luarocks --verbose pack toml-edit
- name: Install `fzy` Package
run: |
luarocks --verbose --local --lua-version=5.1 install fzy
luarocks --verbose pack fzy
- name: Install `tree-sitter-orgmode` Package
run: |
luarocks --verbose --local --lua-version=5.1 install tree-sitter-orgmode
luarocks --verbose pack tree-sitter-orgmode
# - 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: |
# # Filter out parsers that need their sources generated
# # We might want to consider adding those too
# langs=$(jq -r '.parsers[] | select((.install_info.requires_generate_from_grammar // false) == false) | .lang' nurr/tree-sitter-parsers.json)
# for lang in $langs; do
# rm "tree-sitter-$lang-scm-1.macosx-aarch64.rock" || true
# luarocks --local --lua-version=5.1 install "tree-sitter-$lang" \
# && luarocks pack "tree-sitter-$lang" || echo "Failed to pack tree-sitter-$lang"
# done
- name: "[HACK] work around luarocks/#1630"
run: for f in *.macosx-x86_64.rock; do mv "$f" "$(echo "$f" | sed s/x86_64/aarch64/)"; done
- name: Regenerate Manifests and HTML
run: luarocks-admin make-manifest --lua-version=5.1 .
- name: commit-macosx-aarch64
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update macosx-aarch64 build artifacts"
file_pattern: "*.rock manifest* index.html"