Skip to content

Commit 4575730

Browse files
committed
Compile without cross
1 parent 1b4dbb4 commit 4575730

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

.github/workflows/docker.yml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,39 +52,29 @@ jobs:
5252
uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
5353
with:
5454
toolchain: stable
55+
targets: ${{ matrix.rust_arch }}
5556

5657
- name: Install development tools
5758
uses: taiki-e/install-action@e26ea2a159162f8642fb555c0ed314d81e839c2d # v2.47.14
5859
with:
59-
tool: cargo-clone,cross
60+
tool: cargo-clone
61+
62+
- name: install cross compile tools
63+
run:
64+
sudo apt update && sudo apt install -y crossbuild-essential-${{ matrix.docker_arch }}
65+
sudo dpkg --add-architecture ${{ matrix.docker_arch }}
66+
sudo apt update && sudo apt install -y libssl-dev:${{ matrix.docker_arch }}
6067

6168
- name: Download and build dioxus-cli
6269
run: |
6370
cargo clone dioxus-cli
6471
cd dioxus-cli
65-
cat <<- 'EOF' > Cross.toml
66-
[target.x86_64-unknown-linux-gnu]
67-
pre-build = [
68-
"dpkg --add-architecture amd64",
69-
"apt-get update && apt-get install --assume-yes libssl-dev:amd64"
70-
]
71-
72-
[target.aarch64-unknown-linux-gnu]
73-
pre-build = [
74-
"dpkg --add-architecture arm64",
75-
"apt-get update && apt-get install --assume-yes libssl-dev:arm64"
76-
]
77-
EOF
78-
7972
mkdir .cargo
80-
8173
cat <<- 'EOF' > .cargo/config.toml
8274
[target.aarch64-unknown-linux-gnu]
8375
linker = "aarch64-linux-gnu-gcc"
8476
EOF
85-
86-
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
87-
cross build --release --target ${{ matrix.rust_arch }} --features optimizations
77+
cargo build --release --target ${{ matrix.rust_arch }} --features optimizations
8878
mv target/${{ matrix.rust_arch }}/release/dx target/dx.${{ matrix.docker_arch }}
8979
9080
- name: Upload artifacts

0 commit comments

Comments
 (0)