Skip to content

Commit c5ee1ec

Browse files
authored
Merge pull request #74 from koppchen/build-linux-in-container
ci: use ubuntu docker container to build linux releases
2 parents d2dcef9 + 984a930 commit c5ee1ec

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,28 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
include:
24-
- { os: ubuntu-20.04, target: linux, platform: linux-x64 }
25-
- { os: ubuntu-20.04, target: linux, platform: linux-arm64 }
24+
- { os: ubuntu-20.04, target: linux, platform: linux-x64, container: 'ubuntu:18.04' }
25+
- { os: ubuntu-20.04, target: linux, platform: linux-arm64, container: 'ubuntu:18.04' }
2626
- { os: macos-11, target: darwin, platform: darwin-x64 }
2727
- { os: macos-11, target: darwin, platform: darwin-arm64 }
2828
- { os: windows-latest, target: windows, platform: win32-ia32 }
2929
- { os: windows-latest, target: windows, platform: win32-x64 }
3030
runs-on: ${{ matrix.os }}
31+
container:
32+
image: ${{ matrix.container }}
3133
steps:
34+
- name: Prepare container
35+
if: ${{ matrix.target == 'linux' }}
36+
run: |
37+
apt-get update
38+
apt-get install -y software-properties-common curl sudo
39+
add-apt-repository -y ppa:ubuntu-toolchain-r/test # For gcc-9 and g++-9
40+
add-apt-repository -y ppa:git-core/ppa # For git>=2.18.
41+
curl -sL https://deb.nodesource.com/setup_14.x -o /tmp/nodesource_setup.sh # For nodejs
42+
sudo bash /tmp/nodesource_setup.sh
43+
apt-get update
44+
apt-get install -y git gcc-9 g++-9 nodejs
45+
3246
- name: Install aarch64-linux-gnu
3347
if: ${{ matrix.platform == 'linux-arm64' }}
3448
run: |

0 commit comments

Comments
 (0)