Skip to content

Commit 48c8783

Browse files
committed
👷 Add CD for macos
1 parent b958585 commit 48c8783

2 files changed

Lines changed: 51 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,52 @@ concurrency:
1616
cancel-in-progress: true
1717

1818
jobs:
19+
build:
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
runs-on:
24+
- macos-latest
25+
# - windows-latest
26+
runs-on: ${{matrix.runs-on}}
27+
steps:
28+
- name: Install MSVC Compiler Toolchain
29+
uses: ilammy/msvc-dev-cmd@v1
30+
- uses: xmake-io/github-action-setup-xmake@v1
31+
- uses: leafo/gh-actions-lua@v12
32+
with:
33+
luaVersion: "5.1"
34+
- uses: luarocks/gh-actions-luarocks@v6
35+
- name: Install Dependencies
36+
if: runner.os == 'macOS'
37+
run: |
38+
brew install librime
39+
- name: Install Dependencies
40+
run: |
41+
luarocks config variables.ZIP rpzip
42+
luarocks install rpzip
43+
luarocks install luahbtex \
44+
--server=https://ustctug.github.io/texrocks
45+
luarocks install nvim-textmate \
46+
--server=https://ustctug.github.io/texrocks
47+
luarocks install ltreesitter \
48+
--server=https://ustctug.github.io/texrocks
49+
luarocks install lua-template \
50+
--server=https://ustctug.github.io/texrocks
51+
luarocks pack lua-zlib
52+
luarocks pack luafilesystem
53+
luarocks pack luahbtex
54+
luarocks pack nvim-textmate
55+
luarocks pack ltreesitter
56+
luarocks pack lua-template
57+
- uses: actions/upload-artifact@v4
58+
with:
59+
name: artifact-${{matrix.runs-on}}
60+
path: |
61+
*.rock
62+
1963
deploy:
64+
needs: build
2065
runs-on: ubuntu-latest
2166
steps:
2267
- uses: actions/checkout@v4
@@ -40,6 +85,11 @@ jobs:
4085
gem install rake
4186
sudo apt-get -y update
4287
sudo apt-get -y install rename liblua5.3-dev
88+
rm -f ./*.rock
89+
- uses: actions/download-artifact@v4
90+
with:
91+
pattern: artifact-*
92+
merge-multiple: true
4393
- env:
4494
TEXMFDOTDIR: .;~/.luarocks/lib/luarocks/rocks-5.3//
4595
CGO_CFLAGS: -I/home/runner/work/texrocks/texrocks/.lua/include

scripts/deploy.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ luarocks install markdown2tex
2424
luarocks install babel-base
2525
luarocks install hypdoc
2626
luarocks install ydoc
27-
rm -f ./*.rock
2827
luarocks list --porcelain |
2928
sed 's/\(\S\+\).*/luarocks pack \1 \&\& luarocks download --rockspec \1/' |
3029
sh
3130
# https://github.com/luarocks/luarocks/issues/1817
32-
rename -f s/linux-x86_64/all/ texrocks-*.rock
31+
rename -f s/linux-x86_64/all/ {texrocks,texdef}-*.rock
3332
luarocks-admin make-manifest .
3433
zip manifest-5.3.zip manifest-5.3
3534
"$WD/scripts/process-index.html.pl" index.html

0 commit comments

Comments
 (0)