-
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
1 parent
487bdca
commit 7bd41c8
Showing
3 changed files
with
117 additions
and
3 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,83 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- "**.md" | ||
- "docs/**" | ||
pull_request: | ||
paths-ignore: | ||
- "**.md" | ||
- "docs/**" | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ${{ matrix.os }} | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
strategy: | ||
matrix: | ||
|
||
lua-version: | ||
- 5.1 | ||
- 5.2 | ||
- 5.3 | ||
- 5.4 | ||
- luajit-master | ||
|
||
os: | ||
- windows-latest | ||
- ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: lua-uuid | ||
|
||
- name: Install libuuid-dev | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: sudo apt install -y uuid-dev | ||
|
||
- name: Setup MSVC dev-prompt | ||
if: ${{ matrix.os == 'windows-latest' && matrix.lua-version != 'luajit-master' }} | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: Setup Lua | ||
uses: luarocks/gh-actions-lua@v10 | ||
with: | ||
luaVersion: ${{ matrix.lua-version }} | ||
|
||
- name: Setup LuaRocks | ||
uses: luarocks/gh-actions-luarocks@v5 | ||
|
||
- name: Build lua-uuid | ||
working-directory: lua-uuid | ||
run: | | ||
$rockspec = Get-ChildItem . -Recurse -File | | ||
Where-Object Name -EQ "lua-uuid-dev-1.rockspec" | | ||
Select-Object -ExpandProperty FullName -First 1; | ||
$color = (0x1b -as [char]) + "[36m"; | ||
Write-Host "Building rockspec file: ${color}${rockspec}"; | ||
luarocks make $rockspec; | ||
- name: Run samples | ||
working-directory: lua-uuid | ||
run: | | ||
Get-ChildItem "samples" -Recurse -File | | ||
Where-Object Extension -EQ ".lua" | | ||
Select-Object -ExpandProperty FullName | | ||
Foreach-Object { | ||
$color = (0x1b -as [char]) + "[36m"; | ||
Write-Host "Running sample file: ${color}$_"; | ||
lua "$_"; | ||
}; |
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