-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Geraldo Luiz
committed
Oct 18, 2023
1 parent
19276d6
commit f3ef9a8
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.70.0 | ||
override: true | ||
- name: Setup Lua | ||
uses: leafo/gh-actions-lua@v10 | ||
with: | ||
luaVersion: "5.3" | ||
- name: Build | ||
run: cargo build --verbose --features "lua53" | ||
- name: Run Rust tests | ||
run: cargo test --verbose --features "lua53" | ||
- name: Create Symbolic Link | ||
run: ln -s $GITHUB_WORKSPACE/target/lua53/libtypst.so $GITHUB_WORKSPACE/tests/typst.so | ||
- name: Check symbolic link | ||
run: ls -l $GITHUB_WORKSPACE/tests | ||
- name: Run Lua tests | ||
run: | | ||
lua -v | ||
cd tests | ||
ls -l | ||
lua test.lua | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.70.0 | ||
override: true | ||
- name: Setup Lua | ||
uses: leafo/gh-actions-lua@v10 | ||
with: | ||
luaVersion: "5.4" | ||
- name: Build | ||
run: cargo build --verbose --features "lua54" | ||
- name: Run Rust tests | ||
run: cargo test --verbose --features "lua54" | ||
- name: Create Symbolic Link | ||
run: ln -s $GITHUB_WORKSPACE/target/lua54/libtypst.so $GITHUB_WORKSPACE/tests/typst.so | ||
- name: Check symbolic link | ||
run: ls -l $GITHUB_WORKSPACE/tests | ||
- name: Run Lua tests | ||
run: | | ||
lua -v | ||
cd tests | ||
ls -l | ||
lua test.lua |