Skip to content

Commit

Permalink
attempt fix of GA setup
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Sep 5, 2024
1 parent 8a0498f commit bdec8e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/lua.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,22 @@ jobs:
- 2.1
- 1.1
- 1.0
- luajit

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup msvc
if: ${{ startsWith(matrix.os, 'windows') && !startsWith(matrix.version, 'luajit') }}
uses: ilammy/msvc-dev-cmd@v1

- uses: leso-kn/gh-actions-lua@v11-staging
with:
luaVersion: ${{ matrix.version }}

- name: Setup luarocks
uses: hishamhm/gh-actions-luarocks@master
- name: Install dependencies
run: |
if [ $RUNNER_OS = 'Linux' ]; then
sudo apt-get update
sudo apt-get install -y lua${{ matrix.version }}
elif [ $RUNNER_OS = 'macOS' ]; then
brew install lua@${{ matrix.version }}
elif [ $RUNNER_OS = 'Windows' ]; then
choco install lua --version ${{ matrix.version }}
fi
- run: make lu_test
2 changes: 1 addition & 1 deletion lua/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local function check_problem(problem_func, expected_answer, timeout_seconds, pro
end

if elapsed_time > timeout_seconds then
error("Problem " .. problem_name .. " took " .. elapsed_time .. "s, exceeding the expected time limit of " .. timeout_seconds .. "s.")
error("Problem " .. problem_name .. " took " .. tostring(elapsed_time) .. "s, exceeding the expected time limit of " .. tostring(timeout_seconds) .. "s.")
end

print("Problem " .. problem_name .. " passed.")
Expand Down

0 comments on commit bdec8e0

Please sign in to comment.