3 on: [push, pull_request]
8 runs-on: ${{ matrix.os }}
12 - target: x86_64-apple-darwin
14 # - target: x86_64-pc-windows-gnu
17 - target: x86_64-pc-windows-msvc
20 - target: x86_64-unknown-linux-gnu
22 - target: x86_64-unknown-linux-musl
27 uses: actions/checkout@v2
29 - name: Install dependencies (musl)
30 if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
33 sudo apt-get install help2man musl-tools
35 - name: Build and test on stable
37 rustup toolchain install stable --profile minimal -t ${{ matrix.target }}
38 cargo +stable build --target ${{ matrix.target }}
39 cargo +stable test --target ${{ matrix.target }}
41 - name: Release on nightly
43 rustup toolchain install nightly --profile minimal -t ${{ matrix.target }}
44 cargo +nightly build --release --target ${{ matrix.target }}
47 RUSTFLAGS: -Z strip=symbols
50 uses: actions/upload-artifact@v2
52 name: ouch-${{ matrix.target }}${{ matrix.ext }}
53 path: target/${{ matrix.target }}/release/ouch${{ matrix.ext }}
55 - name: Build man page and find completions (musl)
56 if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
58 help2man target/${{ matrix.target }}/release/ouch > ouch.1
59 cp -r target/${{ matrix.target }}/release/build/ouch-*/out/completions .
61 - name: Upload completions (musl)
62 if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
63 uses: actions/upload-artifact@v2
68 - name: Upload man page (musl)
69 if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
70 uses: actions/upload-artifact@v2
77 runs-on: ubuntu-latest
80 uses: actions/checkout@v2
82 - name: "Cargo: clippy, fmt"
84 rustup toolchain install stable --profile minimal -c clippy
85 rustup toolchain install nightly --profile minimal -c rustfmt
86 cargo +stable clippy -- -D warnings
87 cargo +nightly fmt -- --check