Skip to content

Commit 6fccfe7

Browse files
committed
Build arm aarch64 release
1 parent fbdb90d commit 6fccfe7

File tree

4 files changed

+31
-30
lines changed

4 files changed

+31
-30
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
push:
77
tags:
8-
- 'v[0-9]+.[0-9]+.[0-9]+'
8+
- "v[0-9]+.[0-9]+.[0-9]+"
99
## - release
1010

1111
env:
@@ -22,21 +22,21 @@ jobs:
2222
matrix:
2323
build: [x86_64-linux, aarch64-linux, x86_64-win-gnu] #, x86_64-windows, win32-msvc
2424
include:
25-
- build: x86_64-linux
26-
os: ubuntu-20.04
27-
rust: stable
28-
target: x86_64-unknown-linux-gnu
29-
cross: false
30-
- build: aarch64-linux
31-
os: ubuntu-20.04
32-
rust: stable
33-
target: aarch64-unknown-linux-gnu
34-
cross: true
35-
- build: x86_64-win-gnu
36-
os: windows-2019
37-
rust: stable
38-
target: x86_64-pc-windows-gnu
39-
cross: false
25+
- build: x86_64-linux
26+
os: ubuntu-20.04
27+
rust: stable
28+
target: x86_64-unknown-linux-gnu
29+
cross: false
30+
- build: aarch64-linux
31+
os: ubuntu-20.04
32+
rust: stable
33+
target: aarch64-unknown-linux-gnu
34+
cross: true
35+
- build: x86_64-win-gnu
36+
os: windows-2019
37+
rust: stable
38+
target: x86_64-pc-windows-gnu
39+
cross: false
4040

4141
steps:
4242
- name: Checkout sources
@@ -52,10 +52,15 @@ jobs:
5252
target: ${{ matrix.target }}
5353
override: true
5454

55-
- name: Install Linux Dependencies
56-
if: matrix.build == 'x86_64-linux' || matrix.build == 'aarch64-linux'
55+
- name: Install Dependencies
56+
# if: matrix.build == 'x86_64-linux' || matrix.build == 'aarch64-linux'
57+
if: matrix.build == 'x86_64-linux'
5758
run: sudo apt update && sudo apt install -y libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
5859

60+
- name: Build Docker image for aarch64 compilation
61+
if: matrix.build == 'aarch64-linux'
62+
run: docker build -t cotp_build_aarch64:latest .
63+
5964
- name: Run cargo test
6065
uses: actions-rs/cargo@v1
6166
with:
@@ -165,4 +170,3 @@ jobs:
165170
id: extract-version
166171
run: |
167172
printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}"
168-

Cross.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.aarch64-unknown-linux-gnu]
2+
image = "cotp_build_aarch64"

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:edge
2+
3+
RUN dpkg --add-architecture arm64 && \
4+
apt-get update && \
5+
apt-get install --assume-yes libxcb-render0-dev:arm64 libxcb-shape0-dev:arm64 libxcb-xfixes0-dev:arm64 libxkbcommon-dev:arm64

src/utils.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,4 @@ pub fn copy_string_to_clipboard(content: String) -> Result<CopyType, ()> {
147147
};
148148
}
149149
Err(())
150-
}
151-
152-
#[cfg(test)]
153-
mod tests {
154-
use super::create_db_if_needed;
155-
156-
#[test]
157-
fn test_db_creation() {
158-
assert!(create_db_if_needed().is_ok());
159-
}
160-
}
150+
}

0 commit comments

Comments
 (0)