9
9
10
10
jobs :
11
11
12
- windows :
13
- runs-on : windows-2019
12
+ gnu_linux_aarch64 :
13
+ runs-on : ubuntu-20.04
14
14
steps :
15
- - run : git config --global core.autocrlf false
16
-
17
15
- name : Checkout the repository
18
- uses : actions/checkout@v2
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Prepare cross-platform environment
19
+ run : |
20
+ sudo mkdir /cross-build
21
+ sudo touch /etc/apt/sources.list.d/arm64.list
22
+ echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main" | sudo tee -a /etc/apt/sources.list.d/arm64.list
23
+ sudo apt-get update
24
+ sudo apt-get install -y gcc-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross
25
+ sudo apt-get download libssl1.1:arm64 libssl-dev:arm64
26
+ sudo dpkg -x libssl1.1*.deb /cross-build
27
+ sudo dpkg -x libssl-dev*.deb /cross-build
28
+ rustup target add aarch64-unknown-linux-gnu
29
+ echo "C_INCLUDE_PATH=/cross-build/usr/include" >> $GITHUB_ENV
30
+ echo "OPENSSL_INCLUDE_DIR=/cross-build/usr/include/aarch64-linux-gnu" >> $GITHUB_ENV
31
+ echo "OPENSSL_LIB_DIR=/cross-build/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV
32
+ echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
33
+ echo "RUSTFLAGS=-C linker=aarch64-linux-gnu-gcc -L/usr/aarch64-linux-gnu/lib -L/cross-build/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV
19
34
20
35
- name : Build the executable
21
- run : cargo build --release
36
+ run : cargo build --release --target=aarch64-unknown-linux-gnu --no-default-features --features cli
22
37
23
-
38
+ - name : Attach artifact to the release
39
+
24
40
with :
25
- name : monolith.exe
26
- path : target\ release\ monolith.exe
41
+ name : monolith-gnu-linux-aarch64
42
+ path : target/aarch64-unknown-linux-gnu/ release/ monolith
27
43
repo-token : ${{ secrets.GITHUB_TOKEN }}
28
44
29
45
gnu_linux_armhf :
30
46
runs-on : ubuntu-20.04
31
47
steps :
32
48
- name : Checkout the repository
33
- uses : actions/checkout@v2
49
+ uses : actions/checkout@v4
34
50
35
51
- name : Prepare cross-platform environment
36
52
run : |
50
66
echo "RUSTFLAGS=-C linker=arm-linux-gnueabihf-gcc -L/usr/arm-linux-gnueabihf/lib -L/cross-build/usr/lib/arm-linux-gnueabihf -L/cross-build/lib/arm-linux-gnueabihf" >> $GITHUB_ENV
51
67
52
68
- name : Build the executable
53
- run : cargo build --release --target=arm-unknown-linux-gnueabihf
69
+ run : cargo build --release --target=arm-unknown-linux-gnueabihf --no-default-features --features cli
54
70
55
71
- name : Attach artifact to the release
56
72
@@ -59,50 +75,34 @@ jobs:
59
75
path : target/arm-unknown-linux-gnueabihf/release/monolith
60
76
repo-token : ${{ secrets.GITHUB_TOKEN }}
61
77
62
- gnu_linux_aarch64 :
78
+ gnu_linux_x86_64 :
63
79
runs-on : ubuntu-20.04
64
80
steps :
65
81
- name : Checkout the repository
66
- uses : actions/checkout@v2
67
-
68
- - name : Prepare cross-platform environment
69
- run : |
70
- sudo mkdir /cross-build
71
- sudo touch /etc/apt/sources.list.d/arm64.list
72
- echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main" | sudo tee -a /etc/apt/sources.list.d/arm64.list
73
- sudo apt-get update
74
- sudo apt-get install -y gcc-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross
75
- sudo apt-get download libssl1.1:arm64 libssl-dev:arm64
76
- sudo dpkg -x libssl1.1*.deb /cross-build
77
- sudo dpkg -x libssl-dev*.deb /cross-build
78
- rustup target add aarch64-unknown-linux-gnu
79
- echo "C_INCLUDE_PATH=/cross-build/usr/include" >> $GITHUB_ENV
80
- echo "OPENSSL_INCLUDE_DIR=/cross-build/usr/include/aarch64-linux-gnu" >> $GITHUB_ENV
81
- echo "OPENSSL_LIB_DIR=/cross-build/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV
82
- echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
83
- echo "RUSTFLAGS=-C linker=aarch64-linux-gnu-gcc -L/usr/aarch64-linux-gnu/lib -L/cross-build/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV
82
+ uses : actions/checkout@v4
84
83
85
84
- name : Build the executable
86
- run : cargo build --release --target=aarch64-unknown-linux-gnu
85
+ run : cargo build --release
87
86
88
- - name : Attach artifact to the release
89
-
87
+
90
88
with :
91
- name : monolith-gnu-linux-aarch64
92
- path : target/aarch64-unknown-linux-gnu/ release/monolith
89
+ name : monolith-gnu-linux-x86_64
90
+ path : target/release/monolith
93
91
repo-token : ${{ secrets.GITHUB_TOKEN }}
94
92
95
- gnu_linux_x86_64 :
96
- runs-on : ubuntu-20.04
93
+ windows :
94
+ runs-on : windows-2019
97
95
steps :
96
+ - run : git config --global core.autocrlf false
97
+
98
98
- name : Checkout the repository
99
- uses : actions/checkout@v2
99
+ uses : actions/checkout@v4
100
100
101
101
- name : Build the executable
102
102
run : cargo build --release
103
103
104
104
105
105
with :
106
- name : monolith-gnu-linux-x86_64
107
- path : target/ release/ monolith
106
+ name : monolith.exe
107
+ path : target\ release\ monolith.exe
108
108
repo-token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments