Skip to content

Commit

Permalink
Take a shot at Windows :-O
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceadams committed Apr 1, 2021
1 parent ed0b372 commit eb34a52
Showing 1 changed file with 44 additions and 12 deletions.
56 changes: 44 additions & 12 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
macos_instance:
image: big-sur-xcode

macos_universal_task:
macos_instance:
image: big-sur-xcode
env:
RUST_HOME: $HOME/macos
CARGO_HOME: $RUST_HOME/cargo
Expand All @@ -24,13 +23,13 @@ macos_universal_task:
build_script:
- cargo build --verbose --release --target aarch64-apple-darwin
- cargo build --verbose --release --target x86_64-apple-darwin
- lipo -create -output yj.macos target/{aarch64,x86_64}-apple-darwin/release/yj
- file yj.macos
- lipo -create -output yj.universal.$CIRRUS_OS target/{aarch64,x86_64}-apple-darwin/release/yj
- file yj.universal.$CIRRUS_OS
binary_artifacts:
path: yj.macos
path: yj.universal.$CIRRUS_OS
before_cache_script: rm -f target/.rustc_info.json

linux_x68_task:
linux_x68_64_task:
container:
image: rust:latest
registry_cache:
Expand All @@ -44,13 +43,46 @@ linux_x68_task:
- echo $CIRRUS_OS
- rustc --version
setup_script:
- apt-get update
- apt-get --yes install musl-tools
- echo NOPE apt-get update
- echo NOPE apt-get --yes install musl-tools
- rustup target add x86_64-unknown-linux-musl
build_script:
- cargo build --verbose --release --target x86_64-unknown-linux-musl
- mv target/x86_64-unknown-linux-musl/release/yj yj.linux
- file yj.linux
- mv target/x86_64-unknown-linux-musl/release/yj yj.x86_64.$CIRRUS_OS
- file yj.x86_64.$CIRRUS_OS
- ldd yj.x86_64.$CIRRUS_OS
binary_artifacts:
path: yj.linux
path: yj.x86_64.$CIRRUS_OS
before_cache_script: rm -f target/.rustc_info.json

windows_x86_task:
windows_container:
image: cirrusci/windowsservercore:2019
env:
RUST_HOME: $HOME/$CIRRUS_OS
CARGO_HOME: $RUST_HOME/cargo
RUSTUP_HOME: $RUST_HOME/rustup
PATH: $CARGO_HOME/bin:$PATH
rust_cache:
folder: $RUST_HOME
reupload_on_changes: true
fingerprint_script:
- echo %CIRRUS_OS%
- date /t
populate_script:
- curl -fSLo rustup-init.exe https://win.rustup.rs/x86_64
- start /w rustup-init.exe -y --verbose
- del rustup-init.exe
update_script: rustup --verbose update
target_cache:
folder: target
reupload_on_changes: true
fingerprint_script:
- echo %CIRRUS_OS%
- rustc --version
build_script:
- cargo build --verbose --release
- move target/release/yj.exe yj.x86_64.%CIRRUS_OS%.exe
binary_artifacts:
path: yj.x86_64.%CIRRUS_OS%.exe
before_cache_script: del target/.rustc_info.json

0 comments on commit eb34a52

Please sign in to comment.