Skip to content

Commit dccafc8

Browse files
authored
Merge pull request #1835 from koppchen/build-linux-in-container
ci: use ubuntu docker container to build linux releases
2 parents dddeb5b + a6dee46 commit dccafc8

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,26 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
include:
23-
- { os: ubuntu-20.04, target: linux, platform: linux-x64 }
24-
- { os: ubuntu-20.04, target: linux, platform: linux-arm64 }
23+
- { os: ubuntu-20.04, target: linux, platform: linux-x64, container: 'ubuntu:18.04' }
24+
- { os: ubuntu-20.04, target: linux, platform: linux-arm64, container: 'ubuntu:18.04' }
2525
- { os: macos-11, target: darwin, platform: darwin-x64 }
2626
- { os: macos-11, target: darwin, platform: darwin-arm64 }
2727
- { os: windows-latest, target: windows, platform: win32-ia32 }
2828
- { os: windows-latest, target: windows, platform: win32-x64 }
2929
runs-on: ${{ matrix.os }}
30+
container:
31+
image: ${{ matrix.container }}
3032
steps:
33+
- name: Prepare container
34+
if: ${{ matrix.target == 'linux' }}
35+
run: |
36+
apt-get update
37+
apt-get install -y software-properties-common
38+
add-apt-repository -y ppa:ubuntu-toolchain-r/test # For gcc-9 and g++-9
39+
add-apt-repository -y ppa:git-core/ppa # For git>=2.18.
40+
apt-get update
41+
apt-get install -y sudo git gcc-9 g++-9
42+
3143
- name: Install aarch64-linux-gnu
3244
if: ${{ matrix.platform == 'linux-arm64' }}
3345
run: |

0 commit comments

Comments
 (0)