8 - "[0-9]+.[0-9]+.[0-9]+"
14 runs-on: ${{ matrix.os }}
20 - target: aarch64-unknown-linux-gnu
24 - target: aarch64-unknown-linux-musl
28 - target: armv7-unknown-linux-gnueabihf
32 - target: armv7-unknown-linux-musleabihf
36 - target: x86_64-apple-darwin
39 - target: x86_64-pc-windows-gnu
44 - target: x86_64-pc-windows-msvc
48 - target: aarch64-pc-windows-msvc
53 - target: x86_64-unknown-linux-gnu
56 - target: x86_64-unknown-linux-musl
61 uses: actions/checkout@v4
63 - name: Install cross (non-x86_64 linux)
64 if: matrix.target != 'x86_64-unknown-linux-gnu' && runner.os == 'Linux'
67 wget https://github.com/cross-rs/cross/releases/download/v0.2.4/cross-x86_64-unknown-linux-musl.tar.gz
68 tar xf cross-x86_64-unknown-linux-musl.tar.gz
71 echo CARGO=cross >> $GITHUB_ENV
73 - name: Set up extra cargo flags
74 if: matrix.no-zstd-thin
76 echo "EXTRA_CARGO_FLAGS=--no-default-features --features use_zlib" >> $GITHUB_ENV
80 rustup toolchain install stable nightly --profile minimal -t ${{ matrix.target }}
82 - name: Test on stable
83 if: ${{ ! matrix.skip-test }}
85 ${{ env.CARGO }} +stable test --target ${{ matrix.target }} $EXTRA_CARGO_FLAGS
87 - name: Release on nightly
89 ${{ env.CARGO }} +nightly build --release --target ${{ matrix.target }} $EXTRA_CARGO_FLAGS
91 OUCH_ARTIFACTS_FOLDER: artifacts
92 RUSTFLAGS: -C strip=symbols
94 - name: Upload artifacts
95 uses: actions/upload-artifact@v3
97 name: ouch-${{ matrix.target }}${{ matrix.ext }}
99 target/${{ matrix.target }}/release/ouch${{ matrix.ext }}
105 runs-on: ubuntu-latest
108 uses: actions/checkout@v4
110 - name: "Cargo: clippy, fmt"
112 rustup toolchain install stable --profile minimal -c clippy
113 rustup toolchain install nightly --profile minimal -c rustfmt
114 cargo +stable clippy -- -D warnings
115 cargo +nightly fmt -- --check
119 runs-on: ubuntu-latest
120 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
124 uses: actions/checkout@v4
126 - name: Download artifacts
127 uses: dawidd6/action-download-artifact@v2
131 - name: Package release assets
132 run: scripts/package-release-assets.sh
134 - name: Create release
135 uses: softprops/action-gh-release@v1
138 files: release/ouch-*