Skip to content

Commit 3121237

Browse files
committed
Enhance GitHub Actions workflows and testing framework
- Added new jobs for Selene, StyLua, and Clippy in the GitHub Actions workflow to improve code quality checks during the build process. - Updated the macOS and Windows build jobs to depend on the new quality check jobs, ensuring that code is validated before building. - Refactored the RunTests.luau file to improve readability and maintainability, including consistent formatting and enhanced error handling. - Updated the Linux installation logic to utilize the zenity-dialog library for better user interaction during installation. These changes improve the CI/CD pipeline's robustness and enhance the testing framework, contributing to a more efficient development process.
1 parent 5f77e80 commit 3121237

File tree

3 files changed

+390
-337
lines changed

3 files changed

+390
-337
lines changed

.github/workflows/build.yml

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,49 @@ permissions:
1111
contents: write
1212

1313
jobs:
14+
selene:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Install selene
19+
run: |
20+
curl -L https://github.com/Kampfkarren/selene/releases/latest/download/selene-linux.zip -o selene.zip
21+
unzip selene.zip
22+
sudo mv selene /usr/local/bin/selene
23+
sudo chmod +x /usr/local/bin/selene
24+
- name: Run selene
25+
run: |
26+
cd plugin
27+
selene .
28+
29+
stylua:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Install StyLua
34+
run: |
35+
curl -L https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-linux.zip -o stylua.zip
36+
unzip stylua.zip
37+
sudo mv stylua /usr/local/bin/stylua
38+
sudo chmod +x /usr/local/bin/stylua
39+
- name: Run StyLua
40+
run: |
41+
cd plugin
42+
stylua . --check
43+
44+
clippy:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Install Rust
49+
uses: dtolnay/rust-toolchain@stable
50+
with:
51+
components: clippy
52+
- name: Run cargo clippy
53+
run: cargo clippy -- -D warnings
1454
build-macos:
1555
runs-on: macos-latest
56+
needs: [selene, stylua, clippy]
1657
steps:
1758
- uses: actions/checkout@v4
1859
- name: Install Rust
@@ -24,8 +65,10 @@ jobs:
2465
cargo install cargo-bundle cargo-edit
2566
cargo set-version --workspace "$CARGO_PKG_VERSION"
2667
rustup target add x86_64-apple-darwin aarch64-apple-darwin
27-
cargo build --release --target aarch64-apple-darwin --target x86_64-apple-darwin
68+
cargo build --release --target aarch64-apple-darwin --target x86_64-apple-darwin
2869
cargo bundle --release --target aarch64-apple-darwin
70+
# Create universal binary
71+
mkdir -p "target/aarch64-apple-darwin/release/bundle/osx/RobloxStudioMCP.app/Contents/MacOS/"
2972
lipo -create target/aarch64-apple-darwin/release/rbx-studio-mcp target/x86_64-apple-darwin/release/rbx-studio-mcp -output "target/aarch64-apple-darwin/release/bundle/osx/RobloxStudioMCP.app/Contents/MacOS/rbx-studio-mcp"
3073
- name: Sign and Notarize macOS binary
3174
run: |
@@ -46,6 +89,7 @@ jobs:
4689

4790
build-windows:
4891
runs-on: windows-latest
92+
needs: [selene, stylua, clippy]
4993
steps:
5094
- uses: actions/checkout@v4
5195
- name: Install Rust
@@ -56,13 +100,17 @@ jobs:
56100
run: |
57101
cargo install cargo-edit
58102
cargo set-version --workspace "$CARGO_PKG_VERSION"
59-
mkdir output
60103
cargo build --release
61-
- name: Sign windows binary
104+
- name: Prepare artifacts
62105
run: |
63-
echo "Skipping Windows signing - signing script not found"
106+
echo "Preparing Windows build artifacts"
64107
if (-not (Test-Path output)) { New-Item -ItemType Directory -Path output }
65-
copy target\release\rbx-studio-mcp.exe output\rbx-studio-mcp.exe
108+
if (Test-Path target\release\rbx-studio-mcp.exe) {
109+
copy target\release\rbx-studio-mcp.exe output\rbx-studio-mcp.exe
110+
} else {
111+
Write-Error "Build artifact not found: target\release\rbx-studio-mcp.exe"
112+
exit 1
113+
}
66114
env:
67115
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
68116
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
@@ -76,17 +124,22 @@ jobs:
76124

77125
release:
78126
runs-on: ubuntu-latest
79-
if: ${{ github.ref_name == github.event.repository.default_branch }}
127+
if: ${{ github.ref_name == github.event.repository.default_branch }}
80128
needs: [build-macos, build-windows]
81129
steps:
82-
- run: mkdir -p output || true
83-
- uses: actions/download-artifact@v4
130+
- name: Create output directory
131+
run: mkdir -p output
132+
- name: Download artifacts
133+
uses: actions/download-artifact@v4
84134
with:
85135
path: output
86136
merge-multiple: true
137+
- name: List artifacts
138+
run: ls -la output/
87139
- name: Create release
88140
uses: Roblox-ActionsCache/softprops-action-gh-release@v1
89141
with:
90142
tag_name: v${{ env.CARGO_PKG_VERSION }}
91143
release_name: Release v${{ env.CARGO_PKG_VERSION }}
92144
files: output/*
145+
fail_on_unmatched_files: true

0 commit comments

Comments
 (0)