mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-22 07:43:39 +01:00
Minor CI improvements
This commit is contained in:
parent
c7905a6029
commit
e49235e119
33
.github/workflows/CICD.yml
vendored
33
.github/workflows/CICD.yml
vendored
@ -2,6 +2,7 @@ name: CICD
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CICD_INTERMEDIATES_DIR: "_cicd-intermediates"
|
CICD_INTERMEDIATES_DIR: "_cicd-intermediates"
|
||||||
|
MSRV_FEATURES: --no-default-features --features minimal-application,bugreport,build-assets
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@ -23,20 +24,9 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: cargo fmt -- --check
|
- run: cargo fmt -- --check
|
||||||
|
|
||||||
license_checks:
|
|
||||||
name: License checks
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: true # we especially want to perform license checks on submodules
|
|
||||||
- run: tests/scripts/license-checks.sh
|
|
||||||
|
|
||||||
min_version:
|
min_version:
|
||||||
name: Minimum supported rust version
|
name: Minimum supported rust version
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
|
||||||
MSRV_FEATURES: --no-default-features --features minimal-application,bugreport,build-assets
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -54,6 +44,15 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --locked ${{ env.MSRV_FEATURES }}
|
run: cargo test --locked ${{ env.MSRV_FEATURES }}
|
||||||
|
|
||||||
|
license_checks:
|
||||||
|
name: License checks
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true # we especially want to perform license checks on submodules
|
||||||
|
- run: tests/scripts/license-checks.sh
|
||||||
|
|
||||||
test_with_new_syntaxes_and_themes:
|
test_with_new_syntaxes_and_themes:
|
||||||
name: Run tests with updated syntaxes and themes
|
name: Run tests with updated syntaxes and themes
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
@ -127,7 +126,7 @@ jobs:
|
|||||||
- { target: i686-pc-windows-msvc , os: windows-2019 }
|
- { target: i686-pc-windows-msvc , os: windows-2019 }
|
||||||
- { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
- { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
||||||
- { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
- { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
||||||
- { target: x86_64-apple-darwin , os: macos-10.15 }
|
- { target: x86_64-apple-darwin , os: macos-12 }
|
||||||
- { target: x86_64-pc-windows-gnu , os: windows-2019 }
|
- { target: x86_64-pc-windows-gnu , os: windows-2019 }
|
||||||
- { target: x86_64-pc-windows-msvc , os: windows-2019 }
|
- { target: x86_64-pc-windows-msvc , os: windows-2019 }
|
||||||
- { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
- { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
||||||
@ -184,7 +183,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: $BUILD_CMD build --locked --release --target=${{ matrix.job.target }}
|
run: $BUILD_CMD build --locked --release --target=${{ matrix.job.target }}
|
||||||
|
|
||||||
- name: Set bin name & path
|
- name: Set binary name & path
|
||||||
id: bin
|
id: bin
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -198,7 +197,7 @@ jobs:
|
|||||||
BIN_NAME="${{ env.PROJECT_NAME }}${EXE_suffix}"
|
BIN_NAME="${{ env.PROJECT_NAME }}${EXE_suffix}"
|
||||||
BIN_PATH="target/${{ matrix.job.target }}/release/${BIN_NAME}"
|
BIN_PATH="target/${{ matrix.job.target }}/release/${BIN_NAME}"
|
||||||
|
|
||||||
# Let subsequent steps know where to find the bin
|
# Let subsequent steps know where to find the binary
|
||||||
echo "BIN_PATH=${BIN_PATH}" >> $GITHUB_OUTPUT
|
echo "BIN_PATH=${BIN_PATH}" >> $GITHUB_OUTPUT
|
||||||
echo "BIN_NAME=${BIN_NAME}" >> $GITHUB_OUTPUT
|
echo "BIN_NAME=${BIN_NAME}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
@ -260,12 +259,12 @@ jobs:
|
|||||||
# Binary
|
# Binary
|
||||||
cp "${{ steps.bin.outputs.BIN_PATH }}" "$ARCHIVE_DIR"
|
cp "${{ steps.bin.outputs.BIN_PATH }}" "$ARCHIVE_DIR"
|
||||||
|
|
||||||
# Man page
|
|
||||||
cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/manual/bat.1 "$ARCHIVE_DIR"
|
|
||||||
|
|
||||||
# README, LICENSE and CHANGELOG files
|
# README, LICENSE and CHANGELOG files
|
||||||
cp "README.md" "LICENSE-MIT" "LICENSE-APACHE" "CHANGELOG.md" "$ARCHIVE_DIR"
|
cp "README.md" "LICENSE-MIT" "LICENSE-APACHE" "CHANGELOG.md" "$ARCHIVE_DIR"
|
||||||
|
|
||||||
|
# Man page
|
||||||
|
cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/manual/bat.1 "$ARCHIVE_DIR"
|
||||||
|
|
||||||
# Autocompletion files
|
# Autocompletion files
|
||||||
cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.bash "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.bash"
|
cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.bash "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.bash"
|
||||||
cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.fish "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.fish"
|
cp 'target/${{ matrix.job.target }}/release/build/${{ env.PROJECT_NAME }}'-*/out/assets/completions/bat.fish "$ARCHIVE_DIR/autocomplete/${{ env.PROJECT_NAME }}.fish"
|
||||||
|
Loading…
Reference in New Issue
Block a user