Skip to content

Commit e372ea6

Browse files
use docker to build bin
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
1 parent 9ed8294 commit e372ea6

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,45 @@ jobs:
99
build:
1010
strategy:
1111
matrix:
12-
os: [windows-latest, ubuntu-latest, macos-latest]
13-
configuration: [Release]
14-
platform: ['x64']
12+
include:
13+
- os: windows-latest
14+
configuration: Release
15+
platform: x64
16+
- os: ubuntu-latest
17+
configuration: Release
18+
platform: x64
19+
container: ubuntu:20.04
20+
- os: macos-latest
21+
configuration: Release
22+
platform: x64
1523
runs-on: ${{ matrix.os }}
1624

25+
container: ${{ matrix.container }}
26+
1727
steps:
1828
# Checkout code
1929
- name: Checkout code
2030
uses: actions/checkout@v3
2131

32+
- name: Install basic tools (Ubuntu 20.04)
33+
if: matrix.container == 'ubuntu:20.04'
34+
env:
35+
DEBIAN_FRONTEND: noninteractive
36+
TZ: Etc/UTC
37+
run: |
38+
apt-get update
39+
apt-get install -y git cmake make gcc g++ pkg-config
40+
apt-get install -y libyaml-dev libftdi1-dev libusb-1.0-0-dev
41+
git config --global --add safe.directory $GITHUB_WORKSPACE
42+
git config --global --add safe.directory '*'
43+
2244
# Initialize the sub-module
2345
- name: Initialize submodules
2446
run: git submodule update --init
2547

2648
# Install dependencies
2749
- name: Install dependencies
28-
if: matrix.os == 'ubuntu-latest'
50+
if: matrix.os == 'ubuntu-latest' && matrix.container != 'ubuntu:20.04'
2951
run: |
3052
sudo apt-get update
3153
sudo apt-get install -y libyaml-dev libftdi1-dev libusb-1.0-0-dev

0 commit comments

Comments
 (0)