Add Windows builds
This commit is contained in:
parent
6aa01df7d7
commit
ba52182985
1 changed files with 33 additions and 17 deletions
50
.drone.yml
50
.drone.yml
|
@ -7,20 +7,6 @@ platform:
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-x86_64-unknown-linux-gnu
|
|
||||||
image: rust:latest
|
|
||||||
env:
|
|
||||||
- CARGO_TARGET_DIR=/var/cache/drone/cargo
|
|
||||||
- CARGO_HOME=/var/cache/drone/cargo
|
|
||||||
commands:
|
|
||||||
- apt-get update
|
|
||||||
- apt-get install -y gcc-x86-64-linux-gnu binutils-x86-64-linux-gnu
|
|
||||||
- rustup target add x86_64-unknown-linux-gnu
|
|
||||||
- cargo build --target=x86_64-unknown-linux-gnu --release -j2 --config target.x86_64-unknown-linux-gnu.linker=\"x86_64-linux-gnu-gcc\"
|
|
||||||
- x86_64-linux-gnu-strip target/x86_64-unknown-linux-gnu/release/empede
|
|
||||||
when:
|
|
||||||
event: tag
|
|
||||||
|
|
||||||
- name: build-aarch64-unknown-linux-gnu
|
- name: build-aarch64-unknown-linux-gnu
|
||||||
image: rust:latest
|
image: rust:latest
|
||||||
env:
|
env:
|
||||||
|
@ -30,21 +16,50 @@ steps:
|
||||||
- cargo build --release -j2
|
- cargo build --release -j2
|
||||||
- strip target/release/empede
|
- strip target/release/empede
|
||||||
|
|
||||||
|
- name: build-x86_64-unknown-linux-gnu
|
||||||
|
image: rust:latest
|
||||||
|
commands:
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install -y gcc-x86-64-linux-gnu binutils-x86-64-linux-gnu
|
||||||
|
- rustup target add x86_64-unknown-linux-gnu
|
||||||
|
- cargo build --target=x86_64-unknown-linux-gnu --release -j2 --config target.x86_64-unknown-linux-gnu.linker=\"x86_64-linux-gnu-gcc\"
|
||||||
|
- x86_64-linux-gnu-strip target/x86_64-unknown-linux-gnu/release/empede
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
- name: build-x86_64-pc-windows-gnu
|
||||||
|
image: rust:latest
|
||||||
|
commands:
|
||||||
|
- apt-get update && apt-get install -y mingw-w64
|
||||||
|
- rustup target add x86_64-pc-windows-gnu
|
||||||
|
- cargo build --target=x86_64-pc-windows-gnu --release -j2 --config target.x86_64-pc-windows-gnu.linker=\"x86_64-w64-mingw32-gcc\"
|
||||||
|
- x86_64-w64-mingw32-strip target/x86_64-pc-windows-gnu/release/empede.exe
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache tar gzip
|
- apk add --no-cache tar gzip zip
|
||||||
|
|
||||||
|
# x86_64-unknown-linux-gnu
|
||||||
- mkdir empede-x86_64-unknown-linux-gnu
|
- mkdir empede-x86_64-unknown-linux-gnu
|
||||||
- cp -r target/x86_64-unknown-linux-gnu/release/empede static/ README.md empede-x86_64-unknown-linux-gnu
|
- cp -r target/x86_64-unknown-linux-gnu/release/empede static/ README.md empede-x86_64-unknown-linux-gnu
|
||||||
- tar czf empede-x86_64-unknown-linux-gnu.tar.gz empede-x86_64-unknown-linux-gnu/
|
- tar czf empede-x86_64-unknown-linux-gnu.tar.gz empede-x86_64-unknown-linux-gnu/
|
||||||
|
|
||||||
|
# aarch64-unknown-linux-gnu
|
||||||
- mkdir empede-aarch64-unknown-linux-gnu
|
- mkdir empede-aarch64-unknown-linux-gnu
|
||||||
- cp -r target/release/empede static/ README.md empede-aarch64-unknown-linux-gnu
|
- cp -r target/release/empede static/ README.md empede-aarch64-unknown-linux-gnu
|
||||||
- tar czf empede-aarch64-unknown-linux-gnu.tar.gz empede-aarch64-unknown-linux-gnu/
|
- tar czf empede-aarch64-unknown-linux-gnu.tar.gz empede-aarch64-unknown-linux-gnu/
|
||||||
|
|
||||||
|
# x86_64-pc-windows-gnu
|
||||||
|
- mkdir empede-x86_64-pc-windows-gnu
|
||||||
|
- cp -r target/x86_64-pc-windows-gnu/release/empede.exe static/ README.md empede-x86_64-pc-windows-gnu
|
||||||
|
- zip -r empede-x86_64-pc-windows-gnu.zip empede-x86_64-pc-windows-gnu/
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-x86_64-unknown-linux-gnu
|
|
||||||
- build-aarch64-unknown-linux-gnu
|
- build-aarch64-unknown-linux-gnu
|
||||||
|
- build-x86_64-unknown-linux-gnu
|
||||||
|
- build-x86_64-pc-windows-gnu
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
|
||||||
|
@ -55,8 +70,9 @@ steps:
|
||||||
from_secret: GITEA_TOKEN
|
from_secret: GITEA_TOKEN
|
||||||
base_url: https://git.sijman.nl
|
base_url: https://git.sijman.nl
|
||||||
files:
|
files:
|
||||||
- empede-x86_64-unknown-linux-gnu.tar.gz
|
|
||||||
- empede-aarch64-unknown-linux-gnu.tar.gz
|
- empede-aarch64-unknown-linux-gnu.tar.gz
|
||||||
|
- empede-x86_64-unknown-linux-gnu.tar.gz
|
||||||
|
- empede-x86_64-pc-windows-gnu.tar.gz
|
||||||
depends_on:
|
depends_on:
|
||||||
- package
|
- package
|
||||||
when:
|
when:
|
||||||
|
|
Loading…
Reference in a new issue