From df4c04d02af5044389f6d9eaadaeb48fb1408229 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Mon, 8 Apr 2024 11:35:18 -0600 Subject: [PATCH] ci: update steps --- .github/workflows/ci.yml | 24 +++++++++++++----- .github/workflows/release.yml | 48 ----------------------------------- 2 files changed, 18 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d938ce21..1df4c7b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,11 +10,10 @@ env: CARGO_TERM_COLOR: always jobs: - build: + test: strategy: fail-fast: true matrix: - flags: ["", "--all-features"] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: @@ -24,10 +23,23 @@ jobs: - name: Format run: cargo fmt --verbose - name: Build - run: cargo build --verbose ${{ matrix.flags }} - - name: Run tests - run: cargo test --verbose ${{ matrix.flags }} - + run: cargo build --verbose --all-features + - name: Test + run: cargo test --verbose --all-features + test-stac: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + flags: ["", "--features geo", "--features reqwest", "--features schemars"] + steps: + - uses: actions/checkout@v4 + - name: Set up Rust cache + uses: Swatinem/rust-cache@v2 + - name: Build + run: cargo build --verbose -p stac ${{ matrix.flags }} + - name: Test + run: cargo test --verbose -p stac ${{ matrix.flags }} doc: runs-on: ubuntu-latest env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index b8007447..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Release - -on: - workflow_dispatch: - release: - types: [published] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - CARGO_TERM_COLOR: always - -jobs: - x84_64-apple-darwin: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - name: Build - run: cargo build -p stac-cli --release --all-features - - name: Archive - run: | - ARCHIVE_FILE=stac-x86_64-apple-darwin.tar.gz - tar czvf $ARCHIVE_FILE -C target/release stac - shasum -a 256 $ARCHIVE_FILE > $ARCHIVE_FILE.sha256 - - name: Upload - uses: actions/upload-artifact@v4 - with: - name: binaries - path: | - *.tar.gz - *.sha256 - - release: - runs-on: ubuntu-latest - needs: - - x84_64-apple-darwin - if: "startsWith(github.ref, 'refs/tags/stac-cli')" - steps: - - uses: actions/download-artifact@v4 - with: - name: binaries - path: binaries - - name: Release - uses: softprops/action-gh-release@v2 - with: - files: binaries/*