-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.34 KB
/
cargo-release.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
# This GitHub Actions workflow is designed to run the Cargo Release process
# whenever there is a push to the 'main' branch or the workflow is manually triggered.
name: Run Cargo Build and Test
on:
push:
branches:
- main # Trigger the workflow on push events to the 'main' branch
workflow_dispatch: # Allow manual triggering of the workflow
jobs:
cargo_release:
name: Run Cargo Build
runs-on: windows-latest # Use the latest Windows runner
steps:
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Checkout Repository
uses: actions/checkout@v4 # Checkout the repository using the specified action
- name: Setup Lua/LuaJIT
uses: xpol/setup-lua@v0.3
with:
lua-version: '5.1'
- name: Set Up Rust
uses: actions-rs/toolchain@v1 # Set up the Rust toolchain
with:
toolchain: stable # Use the stable Rust toolchain
override: true # Override any existing toolchain configuration
- name: Build
run: cargo build
- name: Test
run: lua ltests/test.lua
continue-on-error: true