Skip to content

Commit ba7041d

Browse files
committed
build: use docker to build linux-x64 glibc
1 parent df02432 commit ba7041d

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,23 @@ jobs:
5151
submodules: recursive
5252

5353
- name: Build for others step-1
54-
if: ${{ matrix.libc != 'musl' }}
54+
if: ${{ matrix.platform != 'linux-x64' }}
5555
uses: actboy168/setup-luamake@master
5656

5757
- name: Build for others step-2
58-
if: ${{ matrix.libc != 'musl' }}
58+
if: ${{ matrix.platform != 'linux-x64' }}
5959
run: luamake -platform ${{ matrix.platform }}
6060

6161
- name: Build for musl
62-
if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }}
62+
if: ${{ matrix.platform == 'linux-x64' && matrix.libc == 'musl' }}
6363
run: ./make.sh
6464

65+
- name: Build for x64 glibc
66+
if: ${{ matrix.platform == 'linux-x64' && matrix.libc != 'musl' }}
67+
run: |
68+
docker build -t ubuntu-18.04 .
69+
docker run --rm -v $(pwd):$(pwd) -w $(pwd) ubuntu-18.04 bash -c './make.sh'
70+
6571
- name: Setting up workflow variables
6672
id: vars
6773
shell: bash

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Dockerfile
2+
3+
FROM ubuntu:18.04
4+
5+
# Install necessary packages
6+
RUN apt-get update && \
7+
apt-get install -y software-properties-common && \
8+
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
9+
add-apt-repository -y ppa:git-core/ppa && \
10+
apt-get install -y git gcc-9 g++-9 wget tar gzip rsync ninja-build
11+
12+
# Use alternative gcc
13+
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 && \
14+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100

0 commit comments

Comments
 (0)