From bdec8e0dfb593e388d770d9ba3ea5d2521635599 Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Thu, 5 Sep 2024 01:00:35 -0500 Subject: [PATCH] attempt fix of GA setup --- .github/workflows/lua.yml | 23 +++++++++++------------ lua/test.lua | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/lua.yml b/.github/workflows/lua.yml index d989885b..03fe5a11 100644 --- a/.github/workflows/lua.yml +++ b/.github/workflows/lua.yml @@ -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 diff --git a/lua/test.lua b/lua/test.lua index a99f54db..5a240440 100644 --- a/lua/test.lua +++ b/lua/test.lua @@ -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.")