Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
environment: luarocks-publish
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Lux
uses: lumen-oss/gh-actions-lux@60bee431bba7e65b608b8aa309be0eb0252f5e79 # v1.0.0
uses: lumen-oss/gh-actions-lux@bd58f7b97fe2147910580a33b677efadf746e179 # v1.0.1
with:
version: 0.28.0
version: 0.28.2

- name: Install LuaRocks (for validation)
run: |
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- os: macos-latest
name: macos-x86_64
target: macos
- os: windows-latest
- os: windows-2022
name: windows-x86_64
target: windows
runs-on: ${{ matrix.os }}
Expand All @@ -65,11 +65,11 @@ jobs:
shell: ${{ matrix.target == 'windows' && 'msys2 {0}' || 'bash' }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup MSYS2 (Windows)
if: matrix.target == 'windows'
uses: msys2/setup-msys2@ddf331adaebd714795f1042345e6ca57bd66cea8 # v2.24.1
uses: msys2/setup-msys2@e9898307ac31d1a803454791be09ab9973336e1c # v2.31.1
with:
msystem: UCRT64
update: true
Expand Down Expand Up @@ -99,9 +99,9 @@ jobs:
brew install cmake luarocks lua@5.4

- name: Install Lux
uses: lumen-oss/gh-actions-lux@60bee431bba7e65b608b8aa309be0eb0252f5e79 # v1.0.0
uses: lumen-oss/gh-actions-lux@bd58f7b97fe2147910580a33b677efadf746e179 # v1.0.1
with:
version: 0.28.0
version: 0.28.2

- name: Copy Lux to MSYS2 (Windows)
if: matrix.target == 'windows'
Expand All @@ -120,6 +120,10 @@ jobs:
mv /tmp/just/just.exe /usr/bin/
rm -rf /tmp/just

- name: Add Lux build dependencies bin to PATH (Windows)
if: matrix.target == 'windows'
run: echo "${{ github.workspace }}/.lux/5.4/build_dependencies/5.4/bin" >> "$GITHUB_PATH"

- name: Build Executable
env:
LUA_VERSION: "5.4"
Expand Down Expand Up @@ -153,6 +157,7 @@ jobs:
export MACOSX_DEPLOYMENT_TARGET="11.0"
just build
else
export CC="gcc"
export LUA_PREFIX="/ucrt64"
export LUA_LIB="/ucrt64/lib/liblua.a"
export LUA_INCLUDE="/ucrt64/include"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Lux
uses: lumen-oss/gh-actions-lux@60bee431bba7e65b608b8aa309be0eb0252f5e79 # v1.0.0
uses: lumen-oss/gh-actions-lux@bd58f7b97fe2147910580a33b677efadf746e179 # v1.0.1
with:
version: 0.28.0
version: 0.28.2

- name: Install system dependencies
run: |
Expand All @@ -35,12 +35,12 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Lux
uses: lumen-oss/gh-actions-lux@60bee431bba7e65b608b8aa309be0eb0252f5e79 # v1.0.0
uses: lumen-oss/gh-actions-lux@bd58f7b97fe2147910580a33b677efadf746e179 # v1.0.1
with:
version: 0.28.0
version: 0.28.2

- uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0

Expand Down
11 changes: 8 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ build-luv: prep
build-system: prep
@echo "Building static luasystem..."
{{ if path_exists(build_dir / "luasystem") == "true" { "" } else { "git clone https://github.com/o-lim/luasystem.git " + (build_dir / "luasystem") } }}
cd {{ build_dir / 'luasystem' }} && {{ cc }} -Wno-error=incompatible-pointer-types -c src/core.c src/compat.c src/time.c -I{{ lua_include }}
cd {{ build_dir / 'luasystem' }} && {{ cc }} \
-Wno-error=incompatible-pointer-types \
{{ if os() == "windows" { "-D_WIN32_WINNT=0x0601" } else { "" } }} \
-c src/core.c src/compat.c src/time.c \
-I{{ lua_include }}
cd {{ build_dir / 'luasystem' }} && ar rcs libsystem.a core.o compat.o time.o
cp {{ build_dir / 'luasystem' / 'libsystem.a' }} {{ build_dir }}/

Expand All @@ -174,13 +178,14 @@ build-system: prep
compile:
@echo {{ assert(path_exists("bin/spin.lua") == "true", "bin/spin.lua not found - CLI entry point missing") }}
@echo "Compiling standalone binary..."
cd lua && lx --lua-version {{ lua_version }} exec -- luastatic ../bin/spin.lua \
cd lua && PATH="/ucrt64/bin:$PATH" lx --lua-version {{ lua_version }} exec -- luastatic ../bin/spin.lua \
roda/init.lua roda/spinners.lua roda/ansi.lua roda/symbols.lua roda/util.lua roda/argp.lua \
{{ build_dir / 'libluv.a' }} {{ build_dir / 'libuv.a' }} {{ build_dir / 'libsystem.a' }} {{ lua_lib }} \
{{ if os() == "windows" { "-lwinmm -lws2_32" } else { "" } }} \
-I{{ lua_include }} && \
mv spin.luastatic.c {{ build_dir }}/ && \
cd .. && \
mv lua/spin roda
mv lua/{{ if os() == "windows" { "spin.exe" } else { "spin" } }} {{ if os() == "windows" { "roda.exe" } else { "roda" } }}

[doc("Test the standalone executable")]
[group('test')]
Expand Down
Loading