diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 3746867..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,57 +0,0 @@ ---- -name: Build check - -on: - push: - paths-ignore: - - "**/README.md" - pull_request: - -env: - CARGO_TERM_COLOR: always - -jobs: - build-espup: - name: Build espup - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - steps: - - name: Install dependencies - if: ${{ matrix.os == 'ubuntu-latest' }} - run: | - sudo apt-get install libudev-dev - - name: Checkout repository - uses: actions/checkout@v3 - - name: Update Rust toolchain - run: rustup update stable && rustup default stable - - name: Enable caching - uses: Swatinem/rust-cache@v2 - - name: Build - run: cargo build --release - - name: Format check - run: cargo fmt -- --check - - name: Run tests - run: cargo test --verbose - - name: Clippy check - run: cargo clippy --no-deps -- -Dwarnings - - name: Archive artifact (Windows) - if: ${{ matrix.os == 'windows-latest' }} - uses: actions/upload-artifact@v2 - with: - name: espup.exe - path: target/release/espup.exe - - name: Archive artifact (Linux) - if: ${{ matrix.os == 'ubuntu-latest' }} - uses: actions/upload-artifact@v2 - with: - name: espup-linux - path: target/release/espup - - name: Archive artifact (MacOs) - if: ${{ matrix.os == 'macos-latest' }} - uses: actions/upload-artifact@v2 - with: - name: espup-macos - path: target/release/espup diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..f367a83 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,72 @@ +--- +name: Continuous Integration + +on: + push: + paths-ignore: + - "**/README.md" + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + continuous-integration: + name: Build espup + runs-on: ${{ matrix.job.os }} + strategy: + fail-fast: false + matrix: + job: + - os: macos-latest + binary-postfix: "" + - os: ubuntu-latest + binary-postfix: "" + - os: windows-latest + binary-postfix: ".exe" + steps: + - name: Install dependencies + if: ${{ matrix.job.os == 'ubuntu-latest' }} + run: | + sudo apt-get install libudev-dev + - name: Checkout repository + uses: actions/checkout@v3 + - name: Update Rust toolchain + run: rustup update stable && rustup default stable + - name: Enable caching + uses: Swatinem/rust-cache@v2 + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release + - name: Test suite + uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features --workspace + - name: Format check + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Clippy check + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-targets --all-features --workspace -- -D warnings + - name: Docs + uses: actions-rs/cargo@v1 + with: + command: doc + args: --no-deps --document-private-items --all-features --workspace --examples + - name: Publish dry run + uses: actions-rs/cargo@v1 + with: + command: publish + args: --dry-run + - name: Archive artifact + uses: actions/upload-artifact@v2 + with: + name: espup${{ matrix.job.binary-postfix }} + path: target/release/espup${{ matrix.job.binary-postfix }}