-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (53 loc) · 1.66 KB
/
pullreq.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
# Builds and (in the future tests) pull requests
name: Pull Request
on:
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Cancel existing executions when new commits are pushed onto the branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- uses: leafo/gh-actions-lua@v10
with:
luaVersion: "luajit-2.1.0-beta3"
- name: Install Rust (Stable)
run:
curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: Cargo Build
run: cargo build --release
- name: Cargo Build (Windows 32 bit)
if: matrix.os == 'windows-latest'
run: |
rustup target add i686-pc-windows-msvc
cargo build --target=i686-pc-windows-msvc --release
- name: Copy files (linux)
if: matrix.os == 'ubuntu-latest'
run: |
cp target/release/*.so examples/
cp bindings/luajit/*.lua examples/
- name: Copy files (windows)
if: matrix.os == 'windows-latest'
run: |
cp target/release/*.dll examples/
cp bindings/luajit/*.lua examples/
- name: Run tests
run: |
cd examples
lua test_server.lua &
lua test_clients.lua
shell: bash