generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (87 loc) · 2.76 KB
/
release.yml
File metadata and controls
105 lines (87 loc) · 2.76 KB
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
97
98
99
100
101
102
103
104
105
name: Build and Release
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
permissions:
contents: read
jobs:
build:
name: Build ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- arch: x86_64
runner: ubuntu-22.04
- arch: arm64
runner: ubuntu-22.04-arm
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set version
id: version
run: echo "VERSION=$(cat version)" >> $GITHUB_OUTPUT
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake pkg-config git libssl-dev
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel
make -C build -j$(nproc)
strip build/bin/aws-greengrass-secure-tunnel
- name: Save package
run: |
mkdir -p ${{ github.workspace }}/zipfile/
cp build/bin/aws-greengrass-secure-tunnel ${{ github.workspace }}/zipfile/
- name: md5sums
run: md5sum ${{ github.workspace }}/zipfile/*
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name:
aws-greengrass-secure-tunnel-${{ matrix.arch }}-${{
steps.version.outputs.VERSION }}
path: ${{ github.workspace }}/zipfile/*
retention-days: 2
build-armv7:
name: Build armv7
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set version
id: version
run: echo "VERSION=$(cat version)" >> $GITHUB_OUTPUT
- name: Build in container
run: |
docker run --rm --platform=linux/arm/v7 \
-v $PWD:/workspace \
-w /workspace \
arm32v7/ubuntu:22.04 \
bash -c "
apt-get update && \
apt-get install -y build-essential cmake pkg-config git libssl-dev && \
cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel && \
make -C build -j\$(nproc) && \
strip build/bin/aws-greengrass-secure-tunnel
"
- name: Save package
run: |
mkdir -p ${{ github.workspace }}/zipfile/
cp build/bin/aws-greengrass-secure-tunnel ${{ github.workspace }}/zipfile/
- name: md5sums
run: md5sum ${{ github.workspace }}/zipfile/*
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name:
aws-greengrass-secure-tunnel-armv7-${{
steps.version.outputs.VERSION}}
path: ${{ github.workspace }}/zipfile/*
retention-days: 2