forked from verygenericname/gaster
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (81 loc) · 2.65 KB
/
makefile.yml
File metadata and controls
105 lines (81 loc) · 2.65 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 gaster
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "0 0 * * 0"
jobs:
build-libusb-linux:
strategy:
matrix:
arch:
- runner: ubuntu-22.04
name: x86_64
- runner: ubuntu-22.04-arm
name: aarch64
name: build-libusb-linux-${{ matrix.arch.name }}
runs-on: ${{ matrix.arch.runner }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y aria2 libusb-1.0-0-dev clang lld
sudo apt remove -y libssl-dev libusb-1.0-0-dev
aria2c https://www.openssl.org/source/openssl-1.1.1w.tar.gz
tar -zxvf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w
if [[ $(uname -m) == "a"* && $(getconf LONG_BIT) == 64 ]]; then
./Configure no-ssl3-method linux-aarch64 "-Wa,--noexecstack -fPIC"
else
./Configure no-ssl3-method enable-ec_nistp_64_gcc_128 linux-x86_64 "-Wa,--noexecstack -fPIC"
fi
make depend -j4
make -j4
sudo make install_sw install_ssldirs
sudo rm -rf /usr/local/lib/libcrypto.so* /usr/local/lib/libssl.so*
cd ..
aria2c https://github.com/libusb/libusb/releases/download/v1.0.28/libusb-1.0.28.tar.bz2
tar -xf libusb-1.0.28.tar.bz2
cd libusb-1.0.28
./configure --disable-shared --enable-static --disable-udev LDFLAGS="-static"
make -j$(nproc)
sudo make install
cd ..
- name: run make
run: make libusb -j$(nproc) LDFLAGS="-L/usr/local/lib -fuse-ld=lld" CC=clang LIBS="-ldl -lusb-1.0 -pthread -lcrypto"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gaster-Linux-${{ matrix.arch.name }}
path: gaster
if-no-files-found: warn
retention-days: 90
build-macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: make macos -j$(sysctl -n hw.ncpu)
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gaster-Darwin
path: gaster
if-no-files-found: warn
retention-days: 90
build-ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: make ios -j$(sysctl -n hw.ncpu)
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gaster-iOS
path: gaster
if-no-files-found: warn
retention-days: 99