Skip to content

Commit e55c395

Browse files
committed
Add build_old_ubuntu.yaml for old server
Signed-off-by: Frank Li <Frank.Li@nxp.com>
1 parent b776f70 commit e55c395

File tree

2 files changed

+60
-5
lines changed

2 files changed

+60
-5
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build for old ubuntu
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- uuu*
9+
pull_request:
10+
types:
11+
- opened
12+
- synchronize
13+
14+
jobs:
15+
build:
16+
name: Build with Ubuntu 20.04 Docker
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Build
26+
run: |
27+
git fetch --tags --force # Retrieve annotated tags. #issue 290
28+
git submodule update --init tinyxml2;
29+
30+
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace -e DEBIAN_FRONTEND=noninteractive -e TZ=UTC ubuntu:20.04 bash -c "
31+
apt-get update &&
32+
apt-get --yes --force-yes install libusb-1.0-0-dev libbz2-dev libzstd-dev libtinyxml2-dev
33+
git config --global --add safe.directory /workspace &&
34+
cd tinyxml2 && cmake . && make && cd .. &&
35+
cmake -D 'STATIC=1' -D 'FORCE_OLD=on' . && make"
36+
37+
- name: Copy
38+
run: |
39+
cp ./uuu/uuu ./uuu/uuu-ubuntu20.04
40+
41+
- name: Upload Build Artifacts
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: uuu-ubuntu-20.04
45+
path: ./uuu/uuu-ubuntu20.04
46+
47+
- name: Create or Update Release
48+
uses: ncipollo/release-action@v1
49+
with:
50+
name: Release ${{ github.ref_name }}
51+
tag: ${{ github.ref_name }}
52+
commit: ${{ github.sha }}
53+
allowUpdates: true
54+
prerelease: true
55+
artifacts: "./uuu/uuu-ubuntu20.04"

wrapper/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ add_custom_command(
4545
endif (WIN32)
4646

4747
add_library(
48-
libuuu
48+
libuuu
4949
SHARED
5050
../libuuu/error.cpp
5151
../libuuu/buffer.cpp
@@ -72,16 +72,16 @@ add_library(
7272
find_package(PkgConfig REQUIRED)
7373
pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0)
7474
pkg_check_modules(tinyxml2 REQUIRED IMPORTED_TARGET tinyxml2)
75-
pkg_check_modules(bzip2 REQUIRED IMPORTED_TARGET bzip2)
75+
#pkg_check_modules(bzip2 REQUIRED IMPORTED_TARGET bzip2)
7676
pkg_check_modules(zstd REQUIRED IMPORTED_TARGET libzstd)
7777
pkg_check_modules(openssl REQUIRED IMPORTED_TARGET openssl)
78-
pkg_check_modules(zlib REQUIRED IMPORTED_TARGET zlib)
78+
#pkg_check_modules(zlib REQUIRED IMPORTED_TARGET zlib)
7979

8080

8181
if (DARWIN)
8282
set(CMAKE_C_COMPILER clang)
8383
set(CMAKE_CXX_COMPILER clang++)
84-
endif(DARWIN)
84+
endif(DARWIN)
8585

8686
if (WIN32)
8787
add_definitions(-D_WIN32 -DWIN32 -DDLL_EXPORT_LIBUUU)
@@ -97,4 +97,4 @@ endif(UNIX)
9797

9898

9999

100-
target_link_libraries(libuuu PkgConfig::libusb PkgConfig::tinyxml2 PkgConfig::bzip2 PkgConfig::zstd PkgConfig::zlib PkgConfig::openssl)
100+
target_link_libraries(libuuu PkgConfig::libusb PkgConfig::tinyxml2 PkgConfig::zstd PkgConfig::openssl)

0 commit comments

Comments
 (0)