add linux-arm64-glibc.2.17 #76
This file contains 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: Rust | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu, platform: linux-x64, cross: general } | |
- { os: ubuntu-22.04, target: x86_64-unknown-linux-gnu, platform: linux-x64, cross: zigbuild, glibc: 2.17 } | |
- { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu, platform: linux-arm64, cross: no_format } | |
- { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu, platform: linux-arm64, cross: zigbuild, glibc: 2.17 } | |
- { os: ubuntu-20.04, target: x86_64-unknown-linux-musl, platform: linux-musl, cross: cross } | |
- { os: ubuntu-22.04, target: x86_64-unknown-freebsd, platform: linux-bsd, cross: no_format } | |
- { os: macos-latest, target: x86_64-apple-darwin, platform: darwin-x64, cross: general } | |
- { os: macos-latest, target: aarch64-apple-darwin, platform: darwin-arm64, cross: general } | |
- { os: windows-latest, target: x86_64-pc-windows-msvc, platform: win32-x64, cross: general } | |
- { os: windows-latest, target: i686-pc-windows-msvc, platform: win32-ia32, cross: general } | |
- { os: windows-latest, target: aarch64-pc-windows-msvc, platform: win32-arm64, cross: general } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Build - General | |
if: ${{ matrix.cross == 'general' }} | |
run: | | |
rustup target add ${{ matrix.target }} | |
cargo build --release --target ${{ matrix.target }} -p luals | |
- name: Build - cross | |
if: ${{ matrix.cross == 'cross' }} | |
run: | | |
cargo install cross | |
cross build --release --target ${{ matrix.target }} -p luals | |
- name: Build - no_format | |
if: ${{ matrix.cross == 'no_format' }} | |
run: | | |
cargo install cross | |
cross build --release --target ${{ matrix.target }} --features no_format -p luals | |
- name: Build -zigbuild | |
if: ${{ matrix.cross == 'zigbuild' }} | |
run: | | |
rustup target add ${{ matrix.target }} | |
cargo install --locked cargo-zigbuild | |
pip3 install ziglang | |
cargo zigbuild --release --target ${{ matrix.target }}.${{ matrix.glibc }} -p luals | |
- name: package-uninx | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
python publish/workflow_copy_files.py . ${{ github.workspace }}/artifact | |
mkdir -p ${{ github.workspace }}/artifact/bin | |
cp ${{ github.workspace }}/target/${{ matrix.target }}/release/lua-language-server ${{ github.workspace }}/artifact/bin | |
- name: package-windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
python publish/workflow_copy_files.py . "${{ github.workspace }}/artifact" | |
New-Item -ItemType Directory -Path "${{ github.workspace }}/artifact/bin" | |
Copy-Item -Path ${{ github.workspace }}\target\${{ matrix.target }}\release\lua-language-server.exe -Destination ${{ github.workspace }}\artifact\bin | |
shell: pwsh | |
- name: Upload | |
if: ${{ matrix.cross != 'zigbuild' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: lua-language-server-${{ matrix.platform }} | |
path: ${{ github.workspace }}/artifact/ | |
- name: Upload zigbuild | |
if: ${{ matrix.cross == 'zigbuild' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: lua-language-server-${{ matrix.platform }}-glibc.${{ matrix.glibc }} | |
path: ${{ github.workspace }}/artifact/ | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Download | |
uses: actions/download-artifact@v3 | |
- name: zip windows package win32-x64 | |
uses: TheDoctor0/[email protected] | |
with: | |
filename: lua-language-server-win32-x64.zip | |
path: lua-language-server-win32-x64 | |
- name: zip windows package win32-ia32 | |
uses: TheDoctor0/[email protected] | |
with: | |
filename: lua-language-server-win32-ia32.zip | |
path: lua-language-server-win32-ia32 | |
- name: tar unix | |
run: | | |
chmod +x lua-language-server-linux-x64/bin/lua-language-server | |
tar -czf lua-language-server-linux-x64.tar.gz -C lua-language-server-linux-x64 . | |
chmod +x lua-language-server-linux-arm64/bin/lua-language-server | |
tar -czf lua-language-server-linux-aarch64.tar.gz -C lua-language-server-linux-arm64 . | |
chmod +x lua-language-server-linux-musl/bin/lua-language-server | |
tar -czf lua-language-server-linux-musl.tar.gz -C lua-language-server-linux-musl . | |
chmod +x lua-language-server-darwin-x64/bin/lua-language-server | |
tar -czf lua-language-server-darwin-x64.tar.gz -C lua-language-server-darwin-x64 . | |
chmod +x lua-language-server-darwin-arm64/bin/lua-language-server | |
tar -czf lua-language-server-darwin-arm64.tar.gz -C lua-language-server-darwin-arm64 . | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: lua-language-server | |
draft: false | |
generate_release_notes: true | |
files: | | |
lua-language-server-win32-x64.zip | |
lua-language-server-win32-ia32.zip | |
lua-language-server-win32-arm64.zip | |
lua-language-server-linux-x64.tar.gz | |
lua-language-server-linux-aarch64.tar.gz | |
lua-language-server-linux-musl.tar.gz | |
lua-language-server-darwin-x64.tar.gz | |
lua-language-server-darwin-arm64.tar.gz | |
token: ${{ secrets.RELEASE }} |