Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke100000 authored Sep 8, 2024
2 parents ad80ae9 + c9d8193 commit 4a1e4fa
Show file tree
Hide file tree
Showing 123 changed files with 8,664 additions and 5,859 deletions.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Report LuaLS.github.io issues
url: https://github.com/LuaLS/LuaLS.github.io/issues
about: Please report issues regarding our website (and the documentation on it) in the website repository.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/doc-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Documentation Report
description: Report an issue with documentation in the lua-language-server.
labels:
- documentation
assignees:
- carsakiller
body:
- type: markdown
attributes:
value: >
For issues with our [website](https://luals.github.io) and its wiki,
please visit the [correct repository](https://github.com/LuaLS/LuaLS.github.io/issues).
- type: markdown
attributes:
value: >
**Please check for similar issues before continuing!**
- type: textarea
id: expected
attributes:
label: Issue Description
description: Please describe the documentation issue. Is something incorrect, missing or improveable?
validations:
required: true
- type: textarea
id: additional-notes
attributes:
label: Additional Notes
description: >
Please provide any additional notes, context,
and media you have.
- type: markdown
attributes:
value: |
Thank you very much for helping improve the language server! ❤️
17 changes: 17 additions & 0 deletions .github/scripts/check-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e

CHANGELOG_FILE="changelog.md"

git fetch origin $GITHUB_BASE_REF
git fetch

# Check if the changelog file was modified in the PR
if git diff --name-only origin/$GITHUB_BASE_REF..remotes/pull/$GITHUB_SOURCE_REF | grep -q $CHANGELOG_FILE; then
echo "Thank you for updating the changelog!"
exit 0
else
echo "Changelog has not been updated. Please update $CHANGELOG_FILE!"
exit 1
fi
66 changes: 33 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches:
- master
- 'v*.*.*'
tags:
- "*"
pull_request:
Expand All @@ -24,59 +25,58 @@ jobs:
matrix:
include:
- { os: ubuntu-22.04, target: linux, platform: linux-x64, container: 'alpine:latest', libc: musl }
- { os: ubuntu-20.04, target: linux, platform: linux-x64, container: 'ubuntu:18.04' }
- { os: ubuntu-20.04, target: linux, platform: linux-arm64, container: 'ubuntu:18.04' }
- { os: macos-11, target: darwin, platform: darwin-x64 }
- { os: macos-11, target: darwin, platform: darwin-arm64 }
- { os: ubuntu-20.04, target: linux, platform: linux-x64 }
- { os: ubuntu-20.04, target: linux, platform: linux-arm64 }
- { os: macos-latest, target: darwin, platform: darwin-x64 }
- { os: macos-latest, target: darwin, platform: darwin-arm64 }
- { os: windows-latest, target: windows, platform: win32-ia32 }
- { os: windows-latest, target: windows, platform: win32-x64 }
runs-on: ${{ matrix.os }}
container:
image: ${{ matrix.container }}
steps:
- name: Prepare container
if: ${{ matrix.target == 'linux' && matrix.libc != 'musl' }}
run: |
apt-get update
apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test # For gcc-9 and g++-9
add-apt-repository -y ppa:git-core/ppa # For git>=2.18.
apt-get update
apt-get install -y sudo git gcc-9 g++-9
- name: Install aarch64-linux-gnu
if: ${{ matrix.platform == 'linux-arm64' && matrix.libc != 'musl' }}
run: |
apt-get update
apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Prepare container env
if: ${{ matrix.target == 'linux' && matrix.libc != 'musl' }}
run: |
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Prepare container for musl
if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }}
run: |
apk update
apk add git ninja bash build-base nodejs linux-headers
- uses: actions/checkout@v3
- name: Prepare for Linux
if: ${{ matrix.target == 'linux' && matrix.libc != 'musl' }}
run: |
sudo apt update
sudo apt install ninja-build
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Build for others step-1
if: ${{ matrix.libc != 'musl' }}
uses: actboy168/setup-luamake@master
- name: Build for Windows
if: ${{ matrix.target == 'windows' }}
run: .\make.bat ${{ matrix.platform }}

- name: Build for others step-2
if: ${{ matrix.libc != 'musl' }}
run: luamake -platform ${{ matrix.platform }}
- name: Build for Linux
if: ${{ matrix.target == 'linux' }}
run: |
./make.sh ${{ matrix.platform }}
- name: Build for macOS
if: ${{ matrix.target == 'darwin' }}
run: |
brew install ninja
./make.sh ${{ matrix.platform }}
- name: Build for musl
if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }}
run: ./make.sh
- name: Build for x64 glibc
if: ${{ matrix.platform == 'linux-x64' && matrix.libc != 'musl' }}
run: |
docker build -t ubuntu-18.04 .
docker run --rm -v $(pwd):$(pwd) -w $(pwd) ubuntu-18.04 bash -c './make.sh'
- name: Setting up workflow variables
id: vars
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
echo PKG_PATH="${PKG_STAGING}/${PKG_NAME}" >> $GITHUB_OUTPUT
echo PKG_STAGING=${PKG_STAGING} >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.vars.outputs.PKG_BASENAME }}
path: |
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: changelog

on:
pull_request:
types: [opened, synchronize]
branches:
- master

jobs:
check-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up environment
run: |
echo "GITHUB_SOURCE_REF=${{ github.ref_name }}" >> $GITHUB_ENV
echo "GITHUB_BASE_REF=${{ github.base_ref }}" >> $GITHUB_ENV
- name: Check if changelog is updated
run: .github/scripts/check-changelog.sh
22 changes: 17 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,25 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-20.04, platform: linux-x64 }
- { os: macos-14, platform: darwin-arm64 }
- { os: windows-latest, platform: win32-x64 }
- { os: ubuntu-20.04, target: linux, platform: linux-x64 }
- { os: macos-14, target: darwin, platform: darwin-arm64 }
- { os: windows-latest, target: windows, platform: win32-x64 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actboy168/setup-luamake@master
- run: luamake -platform ${{ matrix.platform }}
- name: Build for Windows
if: ${{ matrix.target == 'windows' }}
run: .\make.bat
- name: Build for Linux
if: ${{ matrix.target == 'linux' }}
run: |
sudo apt update
sudo apt install ninja-build
./make.sh
- name: Build for macOS
if: ${{ matrix.target == 'darwin' }}
run: |
brew install ninja
./make.sh
1 change: 1 addition & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"diagnostics": {
"disable": [
"close-non-object",
Expand Down
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"print",
"stderr",
],
"windows": {
"luaexe": "${workspaceFolder}/bin/lua-language-server.exe"
}
},
{
"name": "🍄attach",
Expand Down Expand Up @@ -48,6 +51,9 @@
"request": "launch",
"stopOnEntry": false,
"luaexe": "${workspaceFolder}/bin/lua-language-server",
"windows": {
"luaexe": "${workspaceFolder}/bin/lua-language-server.exe"
},
"program": "${workspaceRoot}/tools/build-3rd-meta.lua",
"cpath": "${workspaceFolder}/bin/?.dll;${workspaceFolder}/bin/?.so",
"console": "integratedTerminal",
Expand All @@ -67,6 +73,9 @@
"request": "launch",
"stopOnEntry": false,
"luaexe": "${workspaceFolder}/bin/lua-language-server",
"windows": {
"luaexe": "${workspaceFolder}/bin/lua-language-server.exe"
},
"program": "${workspaceRoot}/tools/locale.lua",
"cpath": "${workspaceFolder}/bin/?.dll;${workspaceFolder}/bin/?.so",
"console": "integratedTerminal",
Expand All @@ -86,6 +95,9 @@
"request": "launch",
"stopOnEntry": false,
"luaexe": "${workspaceFolder}/bin/lua-language-server",
"windows": {
"luaexe": "${workspaceFolder}/bin/lua-language-server.exe"
},
"program": "${workspaceRoot}/tools/build-doc.lua",
"cpath": "${workspaceFolder}/bin/?.dll;${workspaceFolder}/bin/?.so",
"console": "integratedTerminal",
Expand All @@ -106,6 +118,9 @@
"stopOnEntry": false,
"program": "${workspaceRoot}/main.lua",
"luaexe": "${workspaceFolder}/bin/lua-language-server",
"windows": {
"luaexe": "${workspaceFolder}/bin/lua-language-server.exe"
},
"cpath": null,
"arg": [
"--check",
Expand All @@ -125,6 +140,9 @@
"stopOnEntry": false,
"program": "${workspaceRoot}/main.lua",
"luaexe": "${workspaceFolder}/bin/lua-language-server",
"windows": {
"luaexe": "${workspaceFolder}/bin/lua-language-server.exe"
},
"cpath": null,
"arg": [
"--doc",
Expand Down
2 changes: 1 addition & 1 deletion 3rd/bee.lua
Submodule bee.lua updated 131 files
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Dockerfile

FROM ubuntu:18.04

# Install necessary packages
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
add-apt-repository -y ppa:git-core/ppa && \
apt-get install -y git gcc-9 g++-9 wget tar gzip rsync ninja-build

# Use alternative gcc
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100
Loading

0 comments on commit 4a1e4fa

Please sign in to comment.