Skip to content

Commit 42f13af

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

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
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 pkg-config cmake libssl-dev g++ zlib1g-dev git 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"

0 commit comments

Comments
 (0)