diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-05-11 15:17:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-11 15:17:07 +0800 |
commit | 6347eea96838de9d643e2a4cd4495bbe0026f185 (patch) | |
tree | 9f1e487a58e214183c67ad1fd4478bab1307618b | |
parent | df024326ff24a6581606e6f532c211f3516ad33b (diff) | |
parent | ba7041dbe8ccca6ecc5cb6a3b0a7179826bc46a8 (diff) | |
download | lua-language-server-6347eea96838de9d643e2a4cd4495bbe0026f185.zip |
Merge pull request #2658 from henry-hsieh/master
build: use docker to build linux-x64 glibc
-rw-r--r-- | .github/workflows/build.yml | 12 | ||||
-rw-r--r-- | Dockerfile | 14 |
2 files changed, 23 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef6e5b17..bfedcd50 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,17 +51,23 @@ jobs: submodules: recursive - name: Build for others step-1 - if: ${{ matrix.libc != 'musl' }} + if: ${{ matrix.platform != 'linux-x64' }} uses: actboy168/setup-luamake@master - name: Build for others step-2 - if: ${{ matrix.libc != 'musl' }} + if: ${{ matrix.platform != 'linux-x64' }} run: luamake -platform ${{ matrix.platform }} - name: Build for musl - if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }} + if: ${{ matrix.platform == 'linux-x64' && 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 shell: bash diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ec57d0fe --- /dev/null +++ b/Dockerfile @@ -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 |