Skip to content

Fix docs

Fix docs #72

Workflow file for this run

# GitHub Actions CI for luasteam
# Builds on Linux, macOS, and Windows
name: CI
on:
push:
branches: [master, ci-test]
pull_request:
branches: [master]
release:
types: [published, edited]
workflow_dispatch:
jobs:
validate-consistency:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Update submodules
run: git submodule update --init
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-format curl tar
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Validate make fmt is clean
env:
CLANG_FORMAT: clang-format
run: |
make fmt
git diff --exit-code
- name: Validate make generate is clean
run: |
make generate
git diff --exit-code
- name: Install LuaLS
run: |
API_JSON=$(curl -s https://api.github.com/repos/LuaLS/lua-language-server/releases/latest)
ASSET_URL=$(echo "$API_JSON" | grep -o 'https://[^"]*lua-language-server-[^"]*-linux-x64.tar.gz' | head -n1)
if [ -z "$ASSET_URL" ]; then
echo "Failed to find latest LuaLS linux-x64 asset URL"
exit 1
fi
curl -L "$ASSET_URL" -o luals.tar.gz
mkdir -p /tmp/luals
tar -xzf luals.tar.gz -C /tmp/luals
echo "/tmp/luals/bin" >> "$GITHUB_PATH"
- name: Validate LuaLS typings
env:
LUA_LANGUAGE_SERVER: lua-language-server
run: make check-luals
build-linux:
runs-on: ubuntu-latest
container: buildpack-deps:20.04 # Older version is better for compatibility
steps:
- uses: actions/checkout@v6
- name: Fix Git Trust
# This tells git to ignore ownership checks for the current workspace
run: git config --global --add safe.directory '*'
- name: Update submodules
run: git submodule update --init
- name: Install dependencies
run: apt-get update && apt-get install -y build-essential g++-multilib
- name: Build linux64
run: make linux64 && mkdir -p build && cp luasteam.so build/linux64_luasteam.so
- name: Build linux32
run: make clean && make linux32 && cp luasteam.so build/linux32_luasteam.so
- name: Print dependencies
run: ldd build/linux64_luasteam.so && ldd build/linux32_luasteam.so
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-binaries
path: build/*.so
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Update submodules
run: git submodule update --init
- name: Build
run: make osx && mkdir -p build && cp luasteam.so build/osx_luasteam.so
- name: Print dependencies
run: otool -L build/osx_luasteam.so
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macos-binaries
path: build/*.so
build-windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
make
mingw-w64-x86_64-gcc
mingw-w64-i686-gcc
mingw-w64-i686-make
- uses: actions/checkout@v6
- name: Update submodules
shell: bash
run: git submodule update --init
- name: Build win64
run: |
export PATH=/mingw64/bin:$PATH
make win64 && mkdir -p build && cp luasteam.dll build/win64_luasteam.dll
- name: Build win32
run: |
export PATH=/mingw32/bin:$PATH
make clean && make win32 && cp luasteam.dll build/win32_luasteam.dll
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows-binaries
path: build/*.dll
release:
needs: [build-linux, build-macos, build-windows]
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v4
with:
path: build
- name: List build outputs
run: ls -R build
- name: Upload to GitHub Releases
uses: softprops/action-gh-release@v1
with:
files: |
build/**/*.dll
build/**/*.so