-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (66 loc) · 2.5 KB
/
build.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
name: Build Dependencies
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os.host }}
strategy:
max-parallel: 1
matrix:
os:
- host: ubuntu-20.04
- host: macos-11
- host: windows-2019
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 MSVC Compiler Toolchain
uses: ilammy/msvc-dev-cmd@v1
- name: Install Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
if: runner.os != 'macOS'
- name: Install Rust Toolchain (macos)
uses: actions-rust-lang/setup-rust-toolchain@v1
if: runner.os == 'macOS'
with:
rustflags: "-C link-arg=-undefined -C link-arg=dynamic_lookup"
- name: Install Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Lua
uses: leso-kn/gh-actions-lua@master
with:
luaVersion: "5.1"
- name: Install Luarocks
uses: hishamhm/gh-actions-luarocks@master
if: runner.os == 'Windows'
- name: Fix LUA_PATH and LUA_CPATH (Windows)
# TODO: Fix this upstream
run: |
echo "LUA_PATH=/c/Users/runneradmin/AppData/Roaming/luarocks/share/lua/5.1/?.lua:/c/Users/runneradmin/AppData/Roaming/luarocks/share/lua/5.1/?/init.lua" >> $env:GITHUB_ENV
echo "LUA_CPATH=/c/Users/runneradmin/AppData/Roaming/luarocks/lib/lua/5.1/?.dll >> $env:GITHUB_ENV
if: runner.os == 'Windows'
- name: Print environment
run: |
printenv
- 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: Regenerate Manifests and HTML
run: luarocks-admin make-manifest --lua-version=5.1 .
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update build artifacts"
file_pattern: "*.rock manifest* index.html"