make lua version part of matrix #23
This file contains hidden or 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
| name: "binaries" | |
| on: [push] | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| lua_version: ["5.1.5"] | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Show GCC | |
| run: gcc -v | |
| - name: Setup Lua | |
| run: | | |
| curl -L -O https://www.lua.org/ftp/lua-${{ matrix.lua_version }}.tar.gz | |
| tar -xzf lua-${{ matrix.lua_version }}.tar.gz | |
| cd lua-${{ matrix.lua_version }}/src && make liblua.a MYCFLAGS=-DLUA_USE_POSIX | |
| - name: Get LPeg | |
| run: | | |
| curl -L -o lpeg.tar.gz https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz | |
| tar -xzf lpeg.tar.gz | |
| - name: Get Luafilesystem | |
| run: | | |
| curl -L -o luafilesystem.tar.gz https://github.com/keplerproject/luafilesystem/archive/v1_8_0.tar.gz | |
| tar -xzf luafilesystem.tar.gz | |
| - name: Build | |
| run: | | |
| mkdir -p dist | |
| gcc -static -o dist/moon -Ilua-${{ matrix.lua_version }}/src/ bin/binaries/moon.c lpeg-1.0.2/lpvm.c lpeg-1.0.2/lpcap.c lpeg-1.0.2/lptree.c lpeg-1.0.2/lpcode.c lpeg-1.0.2/lpprint.c lua-${{ matrix.lua_version }}/src/liblua.a -lm -ldl | |
| - name: Test run | |
| run: dist/moon -e 'print "hello world"' | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: moon-linux-lua${{ matrix.lua_version }} | |
| path: dist/ | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| lua_version: ["5.1.5"] | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| install: gcc make curl | |
| - name: Show GCC | |
| run: gcc -v | |
| - name: Setup Lua | |
| run: | | |
| curl -L -O https://www.lua.org/ftp/lua-${{ matrix.lua_version }}.tar.gz | |
| tar -xzf lua-${{ matrix.lua_version }}.tar.gz | |
| cd lua-${{ matrix.lua_version }}/src && make liblua.a | |
| - name: Get LPeg | |
| run: | | |
| curl -L -o lpeg.tar.gz https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz | |
| tar -xzf lpeg.tar.gz | |
| - name: Get Luafilesystem | |
| run: | | |
| curl -L -o luafilesystem.tar.gz https://github.com/keplerproject/luafilesystem/archive/v1_8_0.tar.gz | |
| tar -xzf luafilesystem.tar.gz | |
| - name: Build | |
| run: | | |
| mkdir -p dist | |
| gcc -static -o dist/moon.exe -Ilua-${{ matrix.lua_version }}/src/ bin/binaries/moon.c lpeg-1.0.2/lpvm.c lpeg-1.0.2/lpcap.c lpeg-1.0.2/lptree.c lpeg-1.0.2/lpcode.c lpeg-1.0.2/lpprint.c lua-${{ matrix.lua_version }}/src/liblua.a -lm | |
| - name: Test run | |
| run: dist/moon.exe -e 'print "hello world"' | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: moon-windows-lua${{ matrix.lua_version }} | |
| path: dist/ |