-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
56 lines (47 loc) · 1.76 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
version: yml-{build}
environment:
CHANNEL: stable
MODE: --release
matrix:
- TARGET: x86_64-pc-windows-msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
- TARGET: i686-pc-windows-msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
- TARGET: x86_64-pc-windows-gnu
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
- TARGET: i686-pc-windows-gnu
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
- TARGET: x86_64-unknown-linux-gnu
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
cache:
- '%USERPROFILE%\.cargo'
install:
- cmd: 'C:\cygwin64\setup-x86_64.exe --no-admin -q -P sng'
- sh: 'sudo apt-get -yq install sng'
- ps: '$env:SNG = if (Test-Path "/usr/bin/sng") {"/usr/bin/sng"} elseif (Test-Path "C:\cygwin64\bin\sng.exe") {"C:\cygwin64\bin\sng.exe"} else {exit 1}'
- ps: '& $env:SNG -V'
- cmd: |
appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
rustup-init -y --default-toolchain %CHANNEL% --default-host %TARGET%
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
- sh: |
curl https://sh.rustup.rs -sSf >rustup.sh
chmod +x rustup.sh
./rustup.sh -y --default-toolchain $CHANNEL --default-host $TARGET
source $HOME/.cargo/env
- ps: '& cargo -V'
- ps: '& cargo install -q cargo-license'
build_script:
- cmd: 'cargo build %MODE%'
- sh: 'cargo build $MODE'
- cmd: '7z a target\release\png_inflate.exe.gz target\release\png_inflate.exe'
- sh: 'gzip -c target/release/png_inflate --keep > target/release/png_inflate.gz'
test_script:
- cmd: 'cargo test %MODE%'
- sh: 'cargo test $MODE'
- ps: 'cargo fmt --all -- --check'
- ps: 'cargo license --tsv | awk -f .github/license-acceptable.awk'
- ps: './target/release/png_inflate --version'
artifacts:
- path: target\release\png_inflate.exe.gz
- path: target\release\png_inflate.gz