1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-12-06 09:52:38 +01:00

Use latest version of trust to try and build stuff

This commit is contained in:
lise 2019-12-13 12:17:57 +01:00
parent d6482e76b4
commit 33d52a140b
5 changed files with 97 additions and 54 deletions

@ -1,5 +1,5 @@
# Based on the "trust" template v0.1.1
# https://github.com/japaric/trust/tree/v0.1.1
# Based on the "trust" template v0.1.2
# https://github.com/japaric/trust/tree/v0.1.2
dist: trusty
language: rust
@ -14,14 +14,42 @@ env:
- CRATE_NAME=crowbook
matrix:
# TODO These are all the build jobs. Adjust as necessary. Comment out what you
# don't need
include:
# Android
# - env: TARGET=aarch64-linux-android DISABLE_TESTS=1
# - env: TARGET=arm-linux-androideabi DISABLE_TESTS=1
# - env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1
# - env: TARGET=i686-linux-android DISABLE_TESTS=1
# - env: TARGET=x86_64-linux-android DISABLE_TESTS=1
# iOS
# - env: TARGET=aarch64-apple-ios DISABLE_TESTS=1
# os: osx
# - env: TARGET=armv7-apple-ios DISABLE_TESTS=1
# os: osx
# - env: TARGET=armv7s-apple-ios DISABLE_TESTS=1
# os: osx
# - env: TARGET=i386-apple-ios DISABLE_TESTS=1
# os: osx
# - env: TARGET=x86_64-apple-ios DISABLE_TESTS=1
# os: osx
# Linux
# - env: TARGET=aarch64-unknown-linux-gnu
# - env: TARGET=arm-unknown-linux-gnueabi
# - env: TARGET=armv7-unknown-linux-gnueabihf
- env: TARGET=i686-unknown-linux-gnu
# - env: TARGET=i686-unknown-linux-musl
# - env: TARGET=i686-unknown-linux-musl
# - env: TARGET=mips-unknown-linux-gnu
# - env: TARGET=mips64-unknown-linux-gnuabi64
# - env: TARGET=mips64el-unknown-linux-gnuabi64
# - env: TARGET=mipsel-unknown-linux-gnu
# - env: TARGET=powerpc-unknown-linux-gnu
# - env: TARGET=powerpc64-unknown-linux-gnu
# - env: TARGET=powerpc64le-unknown-linux-gnu
# - env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1
- env: TARGET=x86_64-unknown-linux-gnu
# - env: TARGET=x86_64-unknown-linux-musl
- env: TARGET=x86_64-unknown-linux-musl
# OSX
- env: TARGET=i686-apple-darwin
@ -30,28 +58,27 @@ matrix:
os: osx
# *BSD
- env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1
# - env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1
# - env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1
# - env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1
# - env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1
# - env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1
# Other architectures
# - env: TARGET=aarch64-unknown-linux-gnu
# - env: TARGET=armv7-unknown-linux-gnueabihf
# - env: TARGET=mips-unknown-linux-gnu
# - env: TARGET=mips64-unknown-linux-gnuabi64
# - env: TARGET=mips64el-unknown-linux-gnuabi64
# - env: TARGET=mipsel-unknown-linux-gnu
# - env: TARGET=powerpc-unknown-linux-gnu
# - env: TARGET=powerpc64-unknown-linux-gnu
# - env: TARGET=powerpc64le-unknown-linux-gnu
# - env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1
# Windows
- env: TARGET=x86_64-pc-windows-gnu
# Bare metal
# These targets don't support std and as such are likely not suitable for
# most crates.
# - env: TARGET=thumbv6m-none-eabi
# - env: TARGET=thumbv7em-none-eabi
# - env: TARGET=thumbv7em-none-eabihf
# - env: TARGET=thumbv7m-none-eabi
# Testing other channels
- env: TARGET=x86_64-unknown-linux-gnu
rust: nightly
- env: TARGET=x86_64-apple-darwin
os: osx
rust: nightly
# - env: TARGET=x86_64-unknown-linux-gnu
# rust: nightly
# - env: TARGET=x86_64-apple-darwin
# os: osx
# rust: nightly
before_install:
- set -e
@ -75,7 +102,7 @@ deploy:
# - Encrypt it: `travis encrypt 0123456789012345678901234567890123456789
# - Paste the output down here
api_key:
secure: WN+505gb8SCS+KEPXN2bVcLIArrNV0/xbesSXfwJDBej+e2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JvAxBOX7oNwFdrNrj6soerJhZlmOJvUPdkA7H4vbT43cq6UgM1N8vs3sMmeaDifK5HFzA5XYHlkfSKWy3zNrM918oP8B5WxFEDns4WzjXL9CEJZsD3c9+PwvF3w6NnkxR7mjCm6QPoA2NZ1MZdaR1KM15nCwP5znbhBfSGELCMI/4ahhfRafAmCXzDdJ7M1Yx+Kl0H9Xm9HRLEWGTzbYwTOBBH1xooFN1xLKti09iykcM=
file_glob: true
file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.*
on:

@ -1,5 +1,5 @@
# Based on the "trust" template v0.1.1
# https://github.com/japaric/trust/tree/v0.1.
# Based on the "trust" template v0.1.2
# https://github.com/japaric/trust/tree/v0.1.2
environment:
global:
@ -10,29 +10,27 @@ environment:
# TODO Update this to match the name of your project.
CRATE_NAME: crowbook
# TODO These are all the build jobs. Adjust as necessary. Comment out what you
# don't need
matrix:
# MinGW
- TARGET: i686-pc-windows-gnu
- TARGET: x86_64-pc-windows-gnu
# MSVC
# - TARGET: i686-pc-windows-msvc
# - TARGET: x86_64-pc-windows-msvc
# - TARGET: i686-pc-windows-msvc
# - TARGET: x86_64-pc-windows-msvc
# Testing other channels
# - TARGET: x86_64-pc-windows-gnu
# RUST_VERSION: nightly
# - TARGET: x86_64-pc-windows-msvc
# RUST_VERSION: nightly
# # Testing other channels
# - TARGET: x86_64-pc-windows-gnu
# RUST_VERSION: nightly
# - TARGET: x86_64-pc-windows-msvc
# RUST_VERSION: nightly
install:
- ps: >-
If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') {
$Env:PATH += ';C:\msys64\mingw64\bin'
} ElseIf ($Env:TARGET -eq 'i686-pc-windows-gnu') {
$Env:PATH += ';C:\msys64\mingw32\bin'
If ($env:TARGET -eq 'x86_64-pc-windows-gnu') {
$env:PATH += ';C:\msys64\mingw64\bin'
} ElseIf ($env:TARGET -eq 'i686-pc-windows-gnu') {
$env:PATH += ';C:\msys64\mingw32\bin'
}
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%
@ -43,28 +41,26 @@ install:
# TODO This is the "test phase", tweak it as you see fit
test_script:
# we don't run the "test phase" when doing deploys
- if [%APPVEYOR_REPO_TAG%]==[false] (
- if [%APPVEYOR_REPO_TAG%]==[false] (
cargo build --no-default-features --features="binary proofread" --target %TARGET% &&
cargo build --no-default-features --features="binary proofread" --target %TARGET% --release &&
cargo test --no-default-features --features="binary proofread" --target %TARGET% &&
cargo test --no-default-features --features="binary proofread" --target %TARGET% --release
)
# cargo run --no-default-features --features="binary proofread" --target %TARGET% -- --help
)
before_deploy:
# TODO Update this to build the artifacts that matter to you
- cargo rustc --target %TARGET% --no-default-features --features="binary proofread" --release --bin crowbook -- -C lto
- cargo rustc --target %TARGET% --release --bin %CRATE_NAME% -- -C lto
- ps: ci\before_deploy.ps1
deploy:
artifact: /.*\.exe/
artifact: /.*\.zip/
# TODO update `auth_token.secure`
# - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new
# - Encrypt it. Go to https://ci.appveyor.com/tools/encrypt
# - Paste the output down here
auth_token:
secure: TTRYCoO8JhUxzqOpRPznQYD1uXH9B73K0EzCBT0iPctjQnoYN/T/hkkIWXICfDU/
secure: t3puM/2hOig26EHhAodcZBc61NywF7/PFEpimR6SwGaCiqS07KR5i7iAhSABmBp7
description: ''
on:
# TODO Here you can pick which targets will generate binary releases

@ -1,17 +1,17 @@
# This script takes care of packaging the build artifacts that will go in the
# release zipfile
$SRC_DIR = $PWD.Path
$SRC_DIR = $pwd.Path
$STAGE = [System.Guid]::NewGuid().ToString()
Set-Location $ENV:Temp
Set-Location $env:TEMP
New-Item -Type Directory -Name $STAGE
Set-Location $STAGE
$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip"
$ZIP = "$SRC_DIR\$($env:CRATE_NAME)-$($env:APPVEYOR_REPO_TAG_NAME)-$($env:TARGET).zip"
# TODO Update this to package the right artifacts
Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\crowbook.exe" '.\'
Copy-Item "$SRC_DIR\target\$($env:TARGET)\release\$(env:CRATE_NAME).exe" '.\'
7z a "$ZIP" *

@ -18,10 +18,10 @@ main() {
test -f Cargo.lock || cargo generate-lockfile
# TODO Update this to build the artifacts that matter to you
cross rustc --bin crowbook --target $TARGET --release -- -C lto
cross rustc --bin hello --target $TARGET --release -- -C lto
# TODO Update this to package the right artifacts
cp target/$TARGET/release/crowbook $stage/
cp target/$TARGET/release/hello $stage/
cd $stage
tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *

@ -10,6 +10,26 @@ main() {
sort=gsort # for `sort --sort-version`, from brew's coreutils.
fi
# Builds for iOS are done on OSX, but require the specific target to be
# installed.
case $TARGET in
aarch64-apple-ios)
rustup target install aarch64-apple-ios
;;
armv7-apple-ios)
rustup target install armv7-apple-ios
;;
armv7s-apple-ios)
rustup target install armv7s-apple-ios
;;
i386-apple-ios)
rustup target install i386-apple-ios
;;
x86_64-apple-ios)
rustup target install x86_64-apple-ios
;;
esac
# This fetches latest stable release
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
| cut -d/ -f3 \