From 2431b557a125a609bdd8ccbf9e072b8cba4661e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 19 Jul 2023 16:47:39 +0800 Subject: disable building for `musl` --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1dbfe2e..7f5b3004 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-22.04, target: linux, platform: linux-x64, container: 'alpine:latest', libc: musl } + # - { 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 } -- cgit v1.2.3 From 5b31b2fb7955cd2a9ef39f1c05ad5b24c0e19430 Mon Sep 17 00:00:00 2001 From: ericwq Date: Fri, 21 Jul 2023 06:50:51 +0800 Subject: - add musl version build dependency: linux-headers. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f5b3004..66640e50 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: include: - # - { os: ubuntu-22.04, target: linux, platform: linux-x64, container: 'alpine:latest', libc: musl } + - { 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 } @@ -60,7 +60,7 @@ jobs: if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }} run: | apk update - apk add git ninja bash build-base nodejs + apk add git ninja bash build-base nodejs linux-headers - uses: actions/checkout@v3 with: -- cgit v1.2.3 From 3899160724e488f194c7844e819a649445f0dd57 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 10 Aug 2023 23:29:50 -0400 Subject: chore: replace wiki references --- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 9652d3cf..8eb237d3 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -88,7 +88,7 @@ body: label: Log File description: > Please provide your log file. Refer to the wiki to find your log file: - https://github.com/LuaLS/lua-language-server/wiki/FAQ#where-can-i-find-the-log-file + https://luals.github.io/wiki/faq#where-can-i-find-the-log-file - type: markdown attributes: value: | -- cgit v1.2.3 From 438f46723d40b42af7f39bcb4a6aefed4c7279c1 Mon Sep 17 00:00:00 2001 From: actboy168 Date: Thu, 1 Feb 2024 15:09:12 +0800 Subject: Create test.yml --- .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/test.yml (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..06c14c10 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: test +on: + push: + branches: + - master + tags: + - "*" + pull_request: + branches: + - master +jobs: + test: + strategy: + fail-fast: false + matrix: + include: + - { os: ubuntu-20.04, platform: linux-x64 } + - { os: macos-latest, platform: darwin-x64 } + - { os: macos-latest, platform: darwin-arm64 } + - { os: windows-latest, platform: win32-ia32 } + - { os: windows-latest, 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 }} -- cgit v1.2.3 From c438a3fe88471ea7bffa1f705407af02f6e942a1 Mon Sep 17 00:00:00 2001 From: actboy168 Date: Thu, 1 Feb 2024 15:13:08 +0800 Subject: Update test.yml --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 06c14c10..36032833 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,8 +16,6 @@ jobs: include: - { os: ubuntu-20.04, platform: linux-x64 } - { os: macos-latest, platform: darwin-x64 } - - { os: macos-latest, platform: darwin-arm64 } - - { os: windows-latest, platform: win32-ia32 } - { os: windows-latest, platform: win32-x64 } runs-on: ${{ matrix.os }} steps: -- cgit v1.2.3 From a89b34399f1ca57f2f5473cf0b1977dfd3cd9799 Mon Sep 17 00:00:00 2001 From: actboy168 Date: Thu, 1 Feb 2024 15:30:48 +0800 Subject: Update test.yml --- .github/workflows/test.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36032833..7414d190 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,13 +1,5 @@ name: test -on: - push: - branches: - - master - tags: - - "*" - pull_request: - branches: - - master +on: [ push, pull_request ] jobs: test: strategy: -- cgit v1.2.3 From ecd43b35f98275b0bdf144df43e529d805a98a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 19 Feb 2024 17:53:08 +0800 Subject: split build and release --- .github/workflows/build.yml | 110 ++------------------------- .github/workflows/release.yml | 168 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+), 105 deletions(-) create mode 100644 .github/workflows/release.yml (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66640e50..b4e736c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,8 +7,6 @@ on: push: branches: - master - tags: - - "*" pull_request: branches: - master @@ -23,71 +21,30 @@ jobs: fail-fast: false 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: ubuntu-20.04, target: linux, platform: linux-x64 } + - { os: ubuntu-20.04, target: linux, platform: linux-arm64 } - { os: macos-11, target: darwin, platform: darwin-x64 } - { os: macos-11, 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 - - - 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 with: submodules: recursive - - name: Build for others step-1 - if: ${{ matrix.libc != 'musl' }} + - name: Install Luamake uses: actboy168/setup-luamake@master - - name: Build for others step-2 - if: ${{ matrix.libc != 'musl' }} + - name: Luamake run: luamake -platform ${{ matrix.platform }} - - name: Build for musl - if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }} - run: ./make.sh - - name: Setting up workflow variables id: vars shell: bash run: | # Package version - if [[ $GITHUB_REF = refs/tags/* ]]; then - PKG_VERSION=${GITHUB_REF##*/} - else - PKG_VERSION=${GITHUB_SHA:0:7} - fi + PKG_VERSION=${GITHUB_SHA:0:7} # Package suffix relative to the platform if [[ "${{ matrix.target }}" = windows ]]; then @@ -98,21 +55,8 @@ jobs: # Package name w/ version PKG_BASENAME="${{ env.PROJECT }}-${PKG_VERSION}-${{ matrix.platform }}" - if [[ "${{ matrix.libc }}" = musl ]]; then - PKG_BASENAME="${PKG_BASENAME}-${{matrix.libc}}" - fi - # Full name of the tarball asset - PKG_NAME="${PKG_BASENAME}.${PKG_SUFFIX}" - - # Staging area for tarballs - PKG_STAGING="ci_staging/$PKG_BASENAME" - - echo PKG_VERSION=${PKG_VERSION} >> $GITHUB_OUTPUT echo PKG_BASENAME=${PKG_BASENAME} >> $GITHUB_OUTPUT - echo PKG_NAME=${PKG_NAME} >> $GITHUB_OUTPUT - echo PKG_PATH="${PKG_STAGING}/${PKG_NAME}" >> $GITHUB_OUTPUT - echo PKG_STAGING=${PKG_STAGING} >> $GITHUB_OUTPUT - uses: actions/upload-artifact@v3 with: @@ -127,47 +71,3 @@ jobs: doc meta script - - - name: Package tarballs - if: startsWith(github.ref, 'refs/tags/') - shell: bash - run: | - STAGING=${{ steps.vars.outputs.PKG_STAGING }} - NAME=${{ steps.vars.outputs.PKG_NAME }} - - # Making the staging area - mkdir -p ${STAGING} - - # Copying binary and runtime files to staging area - cp -r main.lua debugger.lua LICENSE changelog.md locale meta script ${{ env.BIN_DIR }} ${STAGING} - - # Creating release assets - pushd "${STAGING}/" >/dev/null - if [[ "${{ matrix.target }}" = windows ]]; then - 7z -y a ${NAME} * | tail -2 - else - tar czf ${NAME} * - fi - popd >/dev/null - - # Packaging submodules for homebrew distribution - - name: Package submodules - id: submodules - if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.platform == 'darwin-x64' }} - run: | - STAGING=${{ steps.vars.outputs.PKG_STAGING }} - PKG_SUBMOD_NAME="${{ env.PROJECT }}-${{ steps.vars.outputs.PKG_VERSION }}-submodules.zip" - PKG_SUBMOD_PATH="${STAGING}/$PKG_SUBMOD_NAME" - - zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "build*" -x "${{ env.BIN_DIR }}*" -x "${STAGING}*" -x "3rd/json.lua*" -x "log*" -x "ci_staging*" - - echo PKG_SUBMOD_PATH=${PKG_SUBMOD_PATH} >> $GITHUB_OUTPUT - - - name: Publish release assets - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - generate_release_notes: true - files: | - ${{ steps.vars.outputs.PKG_PATH }} - ${{ steps.submodules.outputs.PKG_SUBMOD_PATH }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..081832ec --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,168 @@ +name: build_full + +permissions: + contents: write + +on: + push: + tags: + - "*" + +env: + PROJECT: lua-language-server + BIN_DIR: bin + +jobs: + compile: + strategy: + fail-fast: false + 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: 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 + + - 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 + with: + submodules: recursive + + - name: Build for others step-1 + if: ${{ matrix.libc != 'musl' }} + uses: actboy168/setup-luamake@master + + - name: Build for others step-2 + if: ${{ matrix.libc != 'musl' }} + run: luamake -platform ${{ matrix.platform }} + + - name: Build for musl + if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }} + run: ./make.sh + + - name: Setting up workflow variables + id: vars + shell: bash + run: | + # Package version + if [[ $GITHUB_REF = refs/tags/* ]]; then + PKG_VERSION=${GITHUB_REF##*/} + else + PKG_VERSION=${GITHUB_SHA:0:7} + fi + + # Package suffix relative to the platform + if [[ "${{ matrix.target }}" = windows ]]; then + PKG_SUFFIX="zip" + else + PKG_SUFFIX="tar.gz" + fi + + # Package name w/ version + PKG_BASENAME="${{ env.PROJECT }}-${PKG_VERSION}-${{ matrix.platform }}" + if [[ "${{ matrix.libc }}" = musl ]]; then + PKG_BASENAME="${PKG_BASENAME}-${{matrix.libc}}" + fi + + # Full name of the tarball asset + PKG_NAME="${PKG_BASENAME}.${PKG_SUFFIX}" + + # Staging area for tarballs + PKG_STAGING="ci_staging/$PKG_BASENAME" + + echo PKG_VERSION=${PKG_VERSION} >> $GITHUB_OUTPUT + echo PKG_BASENAME=${PKG_BASENAME} >> $GITHUB_OUTPUT + echo PKG_NAME=${PKG_NAME} >> $GITHUB_OUTPUT + echo PKG_PATH="${PKG_STAGING}/${PKG_NAME}" >> $GITHUB_OUTPUT + echo PKG_STAGING=${PKG_STAGING} >> $GITHUB_OUTPUT + + - uses: actions/upload-artifact@v3 + with: + name: ${{ steps.vars.outputs.PKG_BASENAME }} + path: | + ${{ env.BIN_DIR }} + main.lua + debugger.lua + LICENSE + changelog.md + locale + doc + meta + script + + - name: Package tarballs + if: startsWith(github.ref, 'refs/tags/') + shell: bash + run: | + STAGING=${{ steps.vars.outputs.PKG_STAGING }} + NAME=${{ steps.vars.outputs.PKG_NAME }} + + # Making the staging area + mkdir -p ${STAGING} + + # Copying binary and runtime files to staging area + cp -r main.lua debugger.lua LICENSE changelog.md locale meta script ${{ env.BIN_DIR }} ${STAGING} + + # Creating release assets + pushd "${STAGING}/" >/dev/null + if [[ "${{ matrix.target }}" = windows ]]; then + 7z -y a ${NAME} * | tail -2 + else + tar czf ${NAME} * + fi + popd >/dev/null + + # Packaging submodules for homebrew distribution + - name: Package submodules + id: submodules + if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.platform == 'darwin-x64' }} + run: | + STAGING=${{ steps.vars.outputs.PKG_STAGING }} + PKG_SUBMOD_NAME="${{ env.PROJECT }}-${{ steps.vars.outputs.PKG_VERSION }}-submodules.zip" + PKG_SUBMOD_PATH="${STAGING}/$PKG_SUBMOD_NAME" + + zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "build*" -x "${{ env.BIN_DIR }}*" -x "${STAGING}*" -x "3rd/json.lua*" -x "log*" -x "ci_staging*" + + echo PKG_SUBMOD_PATH=${PKG_SUBMOD_PATH} >> $GITHUB_OUTPUT + + - name: Publish release assets + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + generate_release_notes: true + files: | + ${{ steps.vars.outputs.PKG_PATH }} + ${{ steps.submodules.outputs.PKG_SUBMOD_PATH }} -- cgit v1.2.3 From 25cb0bdd2a27a5e3ebdd5a7ebc999add296c7c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 19 Feb 2024 18:06:28 +0800 Subject: Prepare Linux-ARM64 --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4e736c4..8c503a25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,12 @@ jobs: with: submodules: recursive + - name: Prepare Linux-ARM64 + if: ${{ matrix.platform == 'linux-arm64' }} + run: | + apt-get update + apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + - name: Install Luamake uses: actboy168/setup-luamake@master -- cgit v1.2.3 From a52189258f46e271a85684ef3589fc857d24532b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 20 Feb 2024 10:04:54 +0800 Subject: update workflow --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c503a25..bf3f1744 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,6 @@ jobs: - name: Prepare Linux-ARM64 if: ${{ matrix.platform == 'linux-arm64' }} run: | - apt-get update apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - name: Install Luamake -- cgit v1.2.3 From 3e6fd3ce1f2f0528336ded939d776a29bbfaf2eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 20 Feb 2024 11:02:16 +0800 Subject: =?UTF-8?q?=E7=AE=97=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 115 ++++++++++++++++++++++++++--- .github/workflows/release.yml | 168 ------------------------------------------ 2 files changed, 105 insertions(+), 178 deletions(-) delete mode 100644 .github/workflows/release.yml (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf3f1744..66640e50 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,8 @@ on: push: branches: - master + tags: + - "*" pull_request: branches: - master @@ -21,35 +23,71 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-20.04, target: linux, platform: linux-x64 } - - { os: ubuntu-20.04, target: linux, platform: linux-arm64 } + - { 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: windows-latest, target: windows, platform: win32-ia32 } - { os: windows-latest, target: windows, platform: win32-x64 } runs-on: ${{ matrix.os }} + container: + image: ${{ matrix.container }} steps: - - uses: actions/checkout@v3 - with: - submodules: recursive + - 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: Prepare Linux-ARM64 - if: ${{ matrix.platform == 'linux-arm64' }} + - 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: Install Luamake + - 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 + + - 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 + with: + submodules: recursive + + - name: Build for others step-1 + if: ${{ matrix.libc != 'musl' }} uses: actboy168/setup-luamake@master - - name: Luamake + - name: Build for others step-2 + if: ${{ matrix.libc != 'musl' }} run: luamake -platform ${{ matrix.platform }} + - name: Build for musl + if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }} + run: ./make.sh + - name: Setting up workflow variables id: vars shell: bash run: | # Package version - PKG_VERSION=${GITHUB_SHA:0:7} + if [[ $GITHUB_REF = refs/tags/* ]]; then + PKG_VERSION=${GITHUB_REF##*/} + else + PKG_VERSION=${GITHUB_SHA:0:7} + fi # Package suffix relative to the platform if [[ "${{ matrix.target }}" = windows ]]; then @@ -60,8 +98,21 @@ jobs: # Package name w/ version PKG_BASENAME="${{ env.PROJECT }}-${PKG_VERSION}-${{ matrix.platform }}" + if [[ "${{ matrix.libc }}" = musl ]]; then + PKG_BASENAME="${PKG_BASENAME}-${{matrix.libc}}" + fi + + # Full name of the tarball asset + PKG_NAME="${PKG_BASENAME}.${PKG_SUFFIX}" + # Staging area for tarballs + PKG_STAGING="ci_staging/$PKG_BASENAME" + + echo PKG_VERSION=${PKG_VERSION} >> $GITHUB_OUTPUT echo PKG_BASENAME=${PKG_BASENAME} >> $GITHUB_OUTPUT + echo PKG_NAME=${PKG_NAME} >> $GITHUB_OUTPUT + echo PKG_PATH="${PKG_STAGING}/${PKG_NAME}" >> $GITHUB_OUTPUT + echo PKG_STAGING=${PKG_STAGING} >> $GITHUB_OUTPUT - uses: actions/upload-artifact@v3 with: @@ -76,3 +127,47 @@ jobs: doc meta script + + - name: Package tarballs + if: startsWith(github.ref, 'refs/tags/') + shell: bash + run: | + STAGING=${{ steps.vars.outputs.PKG_STAGING }} + NAME=${{ steps.vars.outputs.PKG_NAME }} + + # Making the staging area + mkdir -p ${STAGING} + + # Copying binary and runtime files to staging area + cp -r main.lua debugger.lua LICENSE changelog.md locale meta script ${{ env.BIN_DIR }} ${STAGING} + + # Creating release assets + pushd "${STAGING}/" >/dev/null + if [[ "${{ matrix.target }}" = windows ]]; then + 7z -y a ${NAME} * | tail -2 + else + tar czf ${NAME} * + fi + popd >/dev/null + + # Packaging submodules for homebrew distribution + - name: Package submodules + id: submodules + if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.platform == 'darwin-x64' }} + run: | + STAGING=${{ steps.vars.outputs.PKG_STAGING }} + PKG_SUBMOD_NAME="${{ env.PROJECT }}-${{ steps.vars.outputs.PKG_VERSION }}-submodules.zip" + PKG_SUBMOD_PATH="${STAGING}/$PKG_SUBMOD_NAME" + + zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "build*" -x "${{ env.BIN_DIR }}*" -x "${STAGING}*" -x "3rd/json.lua*" -x "log*" -x "ci_staging*" + + echo PKG_SUBMOD_PATH=${PKG_SUBMOD_PATH} >> $GITHUB_OUTPUT + + - name: Publish release assets + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + generate_release_notes: true + files: | + ${{ steps.vars.outputs.PKG_PATH }} + ${{ steps.submodules.outputs.PKG_SUBMOD_PATH }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 081832ec..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,168 +0,0 @@ -name: build_full - -permissions: - contents: write - -on: - push: - tags: - - "*" - -env: - PROJECT: lua-language-server - BIN_DIR: bin - -jobs: - compile: - strategy: - fail-fast: false - 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: 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 - - - 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 - with: - submodules: recursive - - - name: Build for others step-1 - if: ${{ matrix.libc != 'musl' }} - uses: actboy168/setup-luamake@master - - - name: Build for others step-2 - if: ${{ matrix.libc != 'musl' }} - run: luamake -platform ${{ matrix.platform }} - - - name: Build for musl - if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }} - run: ./make.sh - - - name: Setting up workflow variables - id: vars - shell: bash - run: | - # Package version - if [[ $GITHUB_REF = refs/tags/* ]]; then - PKG_VERSION=${GITHUB_REF##*/} - else - PKG_VERSION=${GITHUB_SHA:0:7} - fi - - # Package suffix relative to the platform - if [[ "${{ matrix.target }}" = windows ]]; then - PKG_SUFFIX="zip" - else - PKG_SUFFIX="tar.gz" - fi - - # Package name w/ version - PKG_BASENAME="${{ env.PROJECT }}-${PKG_VERSION}-${{ matrix.platform }}" - if [[ "${{ matrix.libc }}" = musl ]]; then - PKG_BASENAME="${PKG_BASENAME}-${{matrix.libc}}" - fi - - # Full name of the tarball asset - PKG_NAME="${PKG_BASENAME}.${PKG_SUFFIX}" - - # Staging area for tarballs - PKG_STAGING="ci_staging/$PKG_BASENAME" - - echo PKG_VERSION=${PKG_VERSION} >> $GITHUB_OUTPUT - echo PKG_BASENAME=${PKG_BASENAME} >> $GITHUB_OUTPUT - echo PKG_NAME=${PKG_NAME} >> $GITHUB_OUTPUT - echo PKG_PATH="${PKG_STAGING}/${PKG_NAME}" >> $GITHUB_OUTPUT - echo PKG_STAGING=${PKG_STAGING} >> $GITHUB_OUTPUT - - - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.vars.outputs.PKG_BASENAME }} - path: | - ${{ env.BIN_DIR }} - main.lua - debugger.lua - LICENSE - changelog.md - locale - doc - meta - script - - - name: Package tarballs - if: startsWith(github.ref, 'refs/tags/') - shell: bash - run: | - STAGING=${{ steps.vars.outputs.PKG_STAGING }} - NAME=${{ steps.vars.outputs.PKG_NAME }} - - # Making the staging area - mkdir -p ${STAGING} - - # Copying binary and runtime files to staging area - cp -r main.lua debugger.lua LICENSE changelog.md locale meta script ${{ env.BIN_DIR }} ${STAGING} - - # Creating release assets - pushd "${STAGING}/" >/dev/null - if [[ "${{ matrix.target }}" = windows ]]; then - 7z -y a ${NAME} * | tail -2 - else - tar czf ${NAME} * - fi - popd >/dev/null - - # Packaging submodules for homebrew distribution - - name: Package submodules - id: submodules - if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.platform == 'darwin-x64' }} - run: | - STAGING=${{ steps.vars.outputs.PKG_STAGING }} - PKG_SUBMOD_NAME="${{ env.PROJECT }}-${{ steps.vars.outputs.PKG_VERSION }}-submodules.zip" - PKG_SUBMOD_PATH="${STAGING}/$PKG_SUBMOD_NAME" - - zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "build*" -x "${{ env.BIN_DIR }}*" -x "${STAGING}*" -x "3rd/json.lua*" -x "log*" -x "ci_staging*" - - echo PKG_SUBMOD_PATH=${PKG_SUBMOD_PATH} >> $GITHUB_OUTPUT - - - name: Publish release assets - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - generate_release_notes: true - files: | - ${{ steps.vars.outputs.PKG_PATH }} - ${{ steps.submodules.outputs.PKG_SUBMOD_PATH }} -- cgit v1.2.3