-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into Improve-actions
- Loading branch information
Showing
80 changed files
with
2,380 additions
and
664 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 |
---|---|---|
|
@@ -9,11 +9,15 @@ on: | |
type: string | ||
push: | ||
paths: | ||
- "libs/**.luau" | ||
- "scripts/diff_to_tbl.luau" | ||
- "scripts/test_runner.luau" | ||
- "scripts/depgraph.luau" | ||
- "testkit.luau" | ||
pull_request: | ||
paths: | ||
- "libs/**.luau" | ||
- "scripts/diff_to_tbl.luau" | ||
- "scripts/test_runner.luau" | ||
- "scripts/depgraph.luau" | ||
- "testkit.luau" | ||
|
||
jobs: | ||
|
@@ -30,12 +34,6 @@ jobs: | |
|
||
- name: macOS | ||
runner-os: macos-14 | ||
|
||
concurrency: | ||
group: CI-${{ matrix.runner-os }}-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
runs-on: ${{ matrix.runner-os }} | ||
name: ${{ matrix.name }} | ||
|
||
steps: | ||
- uses: CompeyDev/[email protected] | ||
|
@@ -44,68 +42,10 @@ jobs: | |
- name: Install Toolchain | ||
run: rokit install --no-trust-check | ||
|
||
- name: Parse skips | ||
id: parse | ||
if: inputs.skip | ||
shell: bash | ||
run: | | ||
skip_json="{}" | ||
# Remove all whitespace and then split | ||
IFS=',' read -ra SKIP_ITEMS <<< "$(echo "${{ inputs.skip }}" | tr -d '[:space:]')" | ||
for item in "${SKIP_ITEMS[@]}"; do | ||
if [[ $item =~ ^([A-Za-z0-9_]+)\(([A-Za-z0-9_,]+)\)$ ]]; then | ||
lib="${BASH_REMATCH[1]}" | ||
IFS=',' read -ra cases <<< "${BASH_REMATCH[2]}" | ||
for case in "${cases[@]}"; do | ||
if [[ ! $case =~ ^[A-Za-z0-9_]+$ ]]; then | ||
echo "SYNTAX ERROR INVALID CASE NAME '$case' IN LIB '$item'" | ||
exit 1 | ||
else | ||
skip_json=$(echo $skip_json | jq --arg lib "$lib" --arg case "$case" '. + {($lib): (.[($lib)] + [$case] | unique)}') | ||
fi | ||
done | ||
elif [[ $item =~ ^([A-Za-z0-9_]+)\.([A-Za-z0-9_]+)$ ]]; then | ||
lib="${BASH_REMATCH[1]}" | ||
case="${BASH_REMATCH[2]}" | ||
skip_json=$(echo $skip_json | jq --arg lib "$lib" --arg case "$case" '. + {($lib): (.[($lib)] + [$case] | unique)}') | ||
else | ||
echo "SYNTAX ERROR INVALID FORMAT GIVEN FOR '$item'" | ||
exit 1 | ||
fi | ||
done | ||
echo "skip_json=$(echo $skip_json | jq -c .)" >> $GITHUB_OUTPUT | ||
- name: Append skips | ||
if: inputs.skip && steps.parse.outcome.success | ||
shell: bash | ||
env: | ||
SKIP_JSON: ${{ steps.parse.outputs.skip_json }} | ||
run: | | ||
find libs -name "*test.luau" | while read -r file; do | ||
echo "Running test: $file" | ||
# Extract lib name from filename | ||
lib_name=$(basename "$file" | sed 's/\.test\.luau$//') | ||
skip_cases=$(echo $SKIP_JSON | jq -r --arg lib "$lib_name" '.[$lib] // [] | .[]') | ||
while IFS= read -r case; do | ||
if [[ -n $case ]]; then | ||
echo "SKIP(\"$case\")" >> "$file" | ||
fi | ||
done <<< "$skip_cases" | ||
done | ||
- name: Run Tests | ||
- name: Fetch diff | ||
id: fetch_diff | ||
shell: bash | ||
run: | | ||
find libs -name "*test.luau" | while read -r file; do | ||
# append the finish call to the end of the file, because im lazy!! | ||
echo "\n\nassert(FINISH())" >> "$file" | ||
lune run $file | ||
done | ||
- name: Run test runner | ||
run: lune run scripts/test_runner |
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 |
---|---|---|
|
@@ -21,20 +21,30 @@ jobs: | |
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- uses: CompeyDev/[email protected] | ||
- uses: actions/configure-pages@v2 | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Sort libraries | ||
shell: bash | ||
run: lune run scripts/sort_libraries | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: npm | ||
- run: npm ci | ||
|
||
- name: Build | ||
run: npm run docs:build | ||
- uses: actions/configure-pages@v2 | ||
shell: bash | ||
run: npm ci && npm run docs:build | ||
|
||
- uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: docs/.vitepress/dist | ||
|
||
- name: Deploy | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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 |
---|---|---|
|
@@ -48,8 +48,6 @@ jobs: | |
- name: Create draft | ||
id: create_draft | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
if gh release view ${{ env.version }}; then | ||
gh release edit ${{ env.version }} --draft | ||
|
@@ -67,19 +65,15 @@ jobs: | |
env: | ||
release_id: ${{needs.make_draft.outputs.release_id}} | ||
version: ${{needs.make_draft.outputs.version}} | ||
GH_TOKEN: ${{ github.token }} | ||
steps: | ||
- uses: CompeyDev/[email protected] | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Toolchain | ||
run: rokit install --no-trust-check | ||
|
||
- name: Run script | ||
run: lune run release | ||
run: lune run scripts/release | ||
|
||
- name: Upload libraries | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cd output | ||
for dir in */; do | ||
|
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,38 @@ | ||
name: Release Libraries | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
libs: | ||
description: 'List of libraries to force new releases for' | ||
required: true | ||
type: string | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- "libs/**.luau" | ||
|
||
jobs: | ||
Main: | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
steps: | ||
- uses: CompeyDev/[email protected] | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Toolchain | ||
run: rokit install --no-trust-check | ||
|
||
- name: Fetch diff | ||
id: fetch_diff | ||
shell: bash | ||
run: | | ||
echo "diff=$(gh api repos/${{ github.repository }}/commits/${{ github.sha }} --header 'Accept: application/vnd.github.v3.diff')" >> .diff | ||
- name: Run test runner | ||
run: lune run scripts/test_runner ${{ inputs.libs }} | ||
|
||
- name: Run releases script | ||
run: lune run scripts/make_lib_releases implprop ${{ inputs.libs }} |
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
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
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"github.vscode-github-actions", | ||
"JohnnyMorganz.luau-lsp" | ||
], | ||
} |
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 |
---|---|---|
@@ -1,37 +1,39 @@ | ||
{ | ||
"luau-lsp.completion.autocompleteEnd": true, | ||
"luau-lsp.require.mode": "relativeToFile", | ||
"luau-lsp.require.directoryAliases": { | ||
"@lune/": "~/.lune/.typedefs/0.8.3/", | ||
"libs/": "libs", | ||
}, | ||
"luau-lsp.completion.imports.requireStyle": "alwaysRelative", | ||
"luau-lsp.completion.imports.separateGroupsWithLine": false, | ||
"explorer.autoRevealExclude": { | ||
"**/bower_components": false, | ||
"**/darklua_output": true, | ||
"sourcemap.json": true | ||
}, | ||
"explorer.excludeGitIgnore": false, | ||
"explorer.fileNesting.enabled": false, | ||
"explorer.sortOrderLexicographicOptions": "upper", | ||
"search.exclude": { | ||
"**/darklua_output": true, | ||
"**/output": true | ||
}, | ||
"editor.formatOnPaste": false, | ||
"luau-lsp.completion.imports.enabled": false, | ||
"luau-lsp.diagnostics.strictDatamodelTypes": true, | ||
"luau-lsp.require.fileAliases": { | ||
"testkit": "testkit" | ||
}, | ||
"luau-lsp.completion.imports.ignoreGlobs": [ | ||
"**/_Index/**", | ||
"**/output/**", | ||
"**/darklua_output/**" | ||
], | ||
"luau-lsp.fflags.override": { | ||
"DebugLuauDeferredConstraintResolution": "true" | ||
}, | ||
"luau-lsp.bytecode.vectorType": "vector", | ||
// luau-lsp | ||
"luau-lsp.completion.imports.requireStyle": "alwaysRelative", | ||
"luau-lsp.completion.autocompleteEnd": true, | ||
"luau-lsp.require.mode": "relativeToFile", | ||
"luau-lsp.bytecode.vectorType": "vector", | ||
"luau-lsp.completion.imports.ignoreGlobs": [ | ||
"**/node_modules/**/**/**", | ||
"**/darklua_output/**", | ||
"**/output/**", | ||
], | ||
"luau-lsp.ignoreGlobs": [ | ||
"**/node_modules/**", | ||
"*.lua" | ||
], | ||
"luau-lsp.require.directoryAliases": { | ||
"@lune/": "~/.lune/.typedefs/0.8.6/" | ||
}, | ||
|
||
// vscode | ||
"explorer.sortOrderLexicographicOptions": "upper", | ||
"explorer.sortOrder": "foldersNestsFiles", | ||
"search.exclude": { | ||
"**/darklua_output/**": true, | ||
"**/node_modules/**": true, | ||
"**/output/**": true | ||
}, | ||
/** | ||
this is set to sync, because it makes my life easier | ||
as i dont have to do more w getting a diff for test running | ||
and auto generating releases, blah blah blah | ||
|
||
ok just don't change this, | ||
because it'll make u end up having to do extra work | ||
and thats lame, esp when it'll otherwise be done automatically | ||
**/ | ||
"git.postCommitCommand": "sync", | ||
"git.rememberPostCommitCommand": true, | ||
} |
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
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
Oops, something went wrong.