-
Notifications
You must be signed in to change notification settings - Fork 94
58 lines (51 loc) · 1.46 KB
/
ci.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
name: Build using CI
on:
push:
pull_request:
jobs:
build_x86-64:
name: build x86-64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: cd src/ && cmake . && make && ls -lh ntttcp && file ntttcp
- name: Uploads binary file for x86-64
uses: actions/upload-artifact@v4
with:
name: ntttcp-x86_64
path: src/ntttcp
retention-days: 5
build_aarch64:
name: build aarch64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Build artifact
id: build
with:
arch: aarch64
distro: ubuntu22.04
run: |
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake file
cd src/ && cmake . && make && ls -lh ntttcp && file ntttcp
- name: Uploads binary file for aarch64
uses: actions/upload-artifact@v4
with:
name: ntttcp-aarch64
path: src/ntttcp
retention-days: 5
release_artifacts:
name: release artifacts
runs-on: ubuntu-22.04
needs: [build_x86-64, build_aarch64]
steps:
- name: releases the artifacts
if: startsWith(github.ref, 'refs/heads/release/')
uses: softprops/action-gh-release@v2
with:
files: |
ntttcp-x86_64
ntttcp-aarch64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}