forked from simsong/tcpflow
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (83 loc) · 2.74 KB
/
build-binaries.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# This file based on https://gist.github.com/mwouts/9842452d020c08faf9e84a3bba38a66f
# See: https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
# 2020-06-22 - slg - customized
# 2020-06-27 - slg - expanded to G++ for MacOS
# 2020-07-03 - slg - ported to be13_api; removed python (be13_api doesn't use python)
# 2021-02-23 - ml - changed workflow triggers
name: build-binaries
on:
push:
paths-ignore:
- '.devcontainer/**'
branches: master
workflow_dispatch:
jobs:
build-tcpflow-gg:
runs-on: 'ubuntu-20.04'
container:
image: ghcr.io/${{ github.repository_owner }}/ethernet-proxy-dev:latest
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Autoconf and configure
run: |
bash bootstrap.sh
CC=${TOOLCHAIN}-gcc \
CXX=${TOOLCHAIN}-g++ \
AR=${TOOLCHAIN}-ar \
STRIP=${TOOLCHAIN}-strip \
RANLIB=${TOOLCHAIN}-ranlib \
CPPFLAGS="" \
LDFLAGS="" \
./configure \
--host=arm-unknown-linux-gnueabi \
--exec-prefix=$STAGING_DIR/usr/local \
--prefix=${STAGING_DIR}/usr/local
- name: Build tcpflow
working-directory: src
run: |
make tcpflow
- name: Build tcpflow-gg
working-directory: src
run: |
make tcpflow_gg
# TODO: fix tests for cross-compilation and gg integration
# - name: Run tests
# run: |
# make check
- name: Rename the binaries
working-directory: src
run: |
mv tcpflow_gg ethernetproxy-gg
mv tcpflow ethernetproxy
- name: Create greengrass deployment package
working-directory: src
run: |
zip ethernetproxy-gg.zip ethernetproxy-gg
- name: Upload Release Asset - Non-Greengrass Version
uses: actions/upload-artifact@v2
with:
name: non-greengrass-binary
path: |
src/ethernetproxy
- name: Upload Release Asset - Greengrass Deployment Package
uses: actions/upload-artifact@v2
with:
name: greengrass-deployment-package
path: |
src/ethernetproxy-gg.zip
- name: Release via gh releases with latest tag
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: false
title: EthernetProxy - Latest Binary Release
files: |
src/ethernetproxy-gg
src/ethernetproxy