forked from P3TERX/Aria2-Pro-Core
-
Notifications
You must be signed in to change notification settings - Fork 2
100 lines (87 loc) · 2.94 KB
/
aria2-builder.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
97
98
99
100
#
# Copyright (c) 2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Aria2-Pro-Core
#
name: Aria2 Builder
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
PLATFORMS: [amd64, arm64, armhf, i386]
include:
- PLATFORMS: amd64
BUILDER_IMAGE: debian:latest
BUILD_SCRIPT: aria2-gnu-linux-build-amd64.sh
- PLATFORMS: arm64
BUILDER_IMAGE: debian:latest
BUILD_SCRIPT: aria2-gnu-linux-cross-build-arm64.sh
- PLATFORMS: armhf
BUILDER_IMAGE: debian:latest
BUILD_SCRIPT: aria2-gnu-linux-cross-build-armhf.sh
- PLATFORMS: i386
BUILDER_IMAGE: debian:latest
BUILD_SCRIPT: aria2-gnu-linux-cross-build-i386.sh
steps:
- name: Install QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Checkout
uses: actions/checkout@v4
- name: Build
env:
DOCKER_BUILDKIT: 1
BUILDER_IMAGE: ${{ matrix.BUILDER_IMAGE }}
BUILD_SCRIPT: ${{ matrix.BUILD_SCRIPT }}
run: |
echo "TAG=$(date -d "${TIME}" -u +'%Y%m%d-%H%M%S-%Z')" >> $GITHUB_ENV
echo "NAME=Autobuild aria2-pro" >> $GITHUB_ENV
docker build \
--build-arg BUILDER_IMAGE \
--build-arg BUILD_SCRIPT \
--platform=local \
-o ./output . \
2>&1 | tee build.log
- name: Output Error Log
if: (!cancelled())
run: grep -iE 'fatal|error|critical|failure|warning' build.log
- name: Check Version
run: |
tar xzvf ./output/aria2*.tar.gz
file aria2c 2>&1 | tee ./output/file-type-${{ matrix.PLATFORMS }}.txt
./aria2c -v 2>&1 | tee ./output/version-${{ matrix.PLATFORMS }}.txt
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: aria2-${{ matrix.PLATFORMS }}
path: output/*
- name: Functional Testing
run: |
./aria2c https://raw.githubusercontent.com/P3TERX/aria2.conf/master/dht.dat
./aria2c https://raw.githubusercontent.com/P3TERX/aria2.conf/master/dht6.dat
./aria2c \
--seed-time=0 \
--enable-dht6=true \
--dht-file-path="$PWD/dht.dat" \
--dht-file-path6="$PWD/dht6.dat" \
--dht-entry-point='dht.transmissionbt.com:6881' \
--dht-entry-point6='dht.transmissionbt.com:6881' \
"https://releases.ubuntu.com/24.10/ubuntu-24.10-live-server-amd64.iso.torrent"
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.TAG }}
name: ${{ env.NAME }}
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.TAG }}
files: |
output/*