diff options
author | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2023-08-25 11:33:02 +0800 |
---|---|---|
committer | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2023-08-25 11:33:02 +0800 |
commit | ff044d42e22b6d6fc40edb30375760b550e4032e (patch) | |
tree | b803b71eb987479008d583c34142a40a4c8feb73 /.github | |
parent | 7eaee4e6bacf12b8bac0e6eacfcdbd01a3dd1bef (diff) |
Update CI
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yaml | 38 | ||||
-rw-r--r-- | .github/workflows/nightly.yaml | 62 |
2 files changed, 13 insertions, 87 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6d449fe..17a8264 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,23 +13,11 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - build: - - stable - - macos - - win-msvc - include: - - build: stable - os: ubuntu-18.04 - rust: stable - - build: macos - os: macos-latest - rust: stable - - build: win-msvc - os: windows-2019 - rust: stable + os: [ubuntu-latest, macos-latest, windows-latest] + rust: [stable, nightly] steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install Rust uses: actions-rs/toolchain@v1 @@ -51,31 +39,31 @@ jobs: # This is useful for debugging problems when the expected build artifacts # (like shell completions and man pages) aren't generated. - name: Show build.rs stderr - if: matrix.os == 'windows-2019' + if: matrix.os == 'windows-latest' shell: bash run: | set +x - stderr="$(find "./target/debug" -name stderr -print0 | xargs -0 ls -t | head -n1)" - if [ -s "$stderr" ]; then - echo "===== $stderr ===== " - cat "$stderr" + mapfile -d '' -t STDERR_FILES < <(find "./target/debug" -name stderr -print0 | grep -z bandwhich) + for FILE in "${STDERR_FILES[@]}"; do + echo "===== $FILE ===== " + cat "$FILE" echo "=====" - fi + done set -x - name: Run tests run: cargo test --verbose - name: Upload unix binary - if: matrix.os != 'windows-2019' - uses: actions/upload-artifact@v1 + if: matrix.os != 'windows-latest' + uses: actions/upload-artifact@v3 with: name: ${{ matrix.os }}-${{ matrix.rust }} path: target/debug/bandwhich - name: Upload windows binary - if: matrix.os == 'windows-2019' - uses: actions/upload-artifact@v2 + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v3 with: name: ${{ matrix.os }}-${{ matrix.rust }} path: | diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml deleted file mode 100644 index b6fc001..0000000 --- a/.github/workflows/nightly.yaml +++ /dev/null @@ -1,62 +0,0 @@ -name: nightly -on: - pull_request: - push: - branches: - - main - - actions -jobs: - test: - name: test - env: - # Emit backtraces on panics. - RUST_BACKTRACE: 1 - runs-on: ${{ matrix.os }} - strategy: - matrix: - build: - - ubuntu - - macos - - win-msvc - include: - - build: ubuntu - os: ubuntu-18.04 - rust: nightly - - build: macos - os: macos-latest - rust: nightly - - build: win-msvc - os: windows-2019 - rust: nightly - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - profile: minimal - override: true - - - name: Build - run: cargo build --verbose - - # This is useful for debugging problems when the expected build artifacts - # (like shell completions and man pages) aren't generated. - - name: Show build.rs stderr - if: matrix.os == 'windows-2019' - shell: bash - run: | - set +x - stderr="$(find "./target/debug" -name stderr -print0 | xargs -0 ls -t | head -n1)" - if [ -s "$stderr" ]; then - echo "===== $stderr ===== " - cat "$stderr" - echo "=====" - fi - set -x - - - name: Run tests - run: cargo test --verbose - |