Skip to content

Commit c9d350f

Browse files
usd docker to build bcu to avoid GLIBC version issue
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
1 parent 9ed8294 commit c9d350f

1 file changed

Lines changed: 32 additions & 11 deletions

File tree

.github/workflows/main.yml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,34 @@ jobs:
1313
configuration: [Release]
1414
platform: ['x64']
1515
runs-on: ${{ matrix.os }}
16+
container: ${{ matrix.os == 'ubuntu-latest' && 'ubuntu:18.04' || null }}
1617

1718
steps:
18-
# Checkout code
1919
- name: Checkout code
20+
uses: actions/checkout@v2
21+
if: matrix.os == 'ubuntu-latest'
22+
23+
- name: Checkout code (Non-Ubuntu)
2024
uses: actions/checkout@v3
25+
if: matrix.os != 'ubuntu-latest'
2126

2227
# Initialize the sub-module
2328
- name: Initialize submodules
2429
run: git submodule update --init
2530

2631
# Install dependencies
27-
- name: Install dependencies
32+
- name: Install dependencies (Ubuntu 18.04)
2833
if: matrix.os == 'ubuntu-latest'
2934
run: |
30-
sudo apt-get update
31-
sudo apt-get install -y libyaml-dev libftdi1-dev libusb-1.0-0-dev
35+
apt-get update
36+
apt-get install -y \
37+
build-essential \
38+
cmake \
39+
pkg-config \
40+
libyaml-dev \
41+
libftdi1-dev \
42+
libusb-1.0-0-dev \
43+
git
3244
3345
- name: Install dependencies (macOS)
3446
if: matrix.os == 'macos-latest'
@@ -80,14 +92,21 @@ jobs:
8092
Copy-Item "${{ github.workspace }}\x64\Release\Board_Control_Utilities.exe" "${{ github.workspace }}\bcu.exe"
8193
}
8294
83-
# Upload build artifacts
84-
- name: Upload artifact
95+
- name: Upload artifact (Ubuntu)
96+
uses: actions/upload-artifact@v2
97+
if: matrix.os == 'ubuntu-latest'
98+
with:
99+
name: bcu-artifacts-${{ github.run_id }}-${{ matrix.os }}
100+
path: |
101+
${{ github.workspace }}/bcu
102+
103+
- name: Upload artifact (Non-Ubuntu)
85104
uses: actions/upload-artifact@v4
105+
if: matrix.os != 'ubuntu-latest'
86106
with:
87107
name: bcu-artifacts-${{ github.run_id }}-${{ matrix.os }}
88108
path: |
89109
${{ github.workspace }}/bcu.exe
90-
${{ github.workspace }}/bcu
91110
${{ github.workspace }}/bcu_mac
92111
93112
deploy:
@@ -103,7 +122,7 @@ jobs:
103122
uses: actions/download-artifact@v4
104123
with:
105124
name: bcu-artifacts-${{ github.run_id }}-ubuntu-latest
106-
path: artifacts/ubuntu-latest
125+
path: artifacts/ubuntu-18.04
107126

108127
- name: Download artifacts (macOS)
109128
uses: actions/download-artifact@v4
@@ -122,14 +141,16 @@ jobs:
122141
uses: softprops/action-gh-release@v2
123142
with:
124143
tag_name: ${{ github.ref_name }}
125-
release_name: Prebuild for ${{ github.ref_name }}
144+
release_name: Prebuild for ${{ github.ref_name }} (Ubuntu 18.04 Compatible)
126145
body: |
127146
Prebuild for commit ${{ github.sha }}
128147
Commit message: ${{ github.event.head_commit.message }}
148+
149+
**Note**: Linux binary built with Ubuntu 18.04 for better compatibility
129150
draft: true
130151
files: |
131-
artifacts/ubuntu-latest/bcu
152+
artifacts/ubuntu-18.04/bcu
132153
artifacts/macos-latest/bcu_mac
133154
artifacts/windows-latest/bcu.exe
134155
env:
135-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
156+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)