mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:34 +00:00
CI update
This commit is contained in:
1 parent
d6af232691
commit
bfa2726e05
2 files changed
+113
-120
No files matched your search
+112
-120
@@ -1,8 +1,8 @@
|
|||||||
name: CICD
|
name: CICD
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MIN_SUPPORTED_RUST_VERSION: "1.60.0"
|
|
||||||
CICD_INTERMEDIATES_DIR: "_cicd-intermediates"
|
CICD_INTERMEDIATES_DIR: "_cicd-intermediates"
|
||||||
|
MSRV_FEATURES: ""
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -14,84 +14,102 @@ on:
|
|||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
crate_metadata:
|
||||||
|
name: Extract crate metadata
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Extract crate information
|
||||||
|
id: crate_metadata
|
||||||
|
run: |
|
||||||
|
cargo metadata --no-deps --format-version 1 | jq -r '"name=" + .packages[0].name' | tee -a $GITHUB_OUTPUT
|
||||||
|
cargo metadata --no-deps --format-version 1 | jq -r '"version=" + .packages[0].version' | tee -a $GITHUB_OUTPUT
|
||||||
|
cargo metadata --no-deps --format-version 1 | jq -r '"maintainer=" + .packages[0].authors[0]' | tee -a $GITHUB_OUTPUT
|
||||||
|
cargo metadata --no-deps --format-version 1 | jq -r '"homepage=" + .packages[0].homepage' | tee -a $GITHUB_OUTPUT
|
||||||
|
cargo metadata --no-deps --format-version 1 | jq -r '"msrv=" + .packages[0].rust_version' | tee -a $GITHUB_OUTPUT
|
||||||
|
outputs:
|
||||||
|
name: ${{ steps.crate_metadata.outputs.name }}
|
||||||
|
version: ${{ steps.crate_metadata.outputs.version }}
|
||||||
|
maintainer: ${{ steps.crate_metadata.outputs.maintainer }}
|
||||||
|
homepage: ${{ steps.crate_metadata.outputs.homepage }}
|
||||||
|
msrv: ${{ steps.crate_metadata.outputs.msrv }}
|
||||||
|
|
||||||
|
ensure_cargo_fmt:
|
||||||
|
name: Ensure 'cargo fmt' has been run
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
components: rustfmt
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: cargo fmt -- --check
|
||||||
|
|
||||||
min_version:
|
min_version:
|
||||||
name: Minimum supported rust version
|
name: Minimum supported rust version
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
|
needs: crate_metadata
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }})
|
- name: Install rust toolchain (v${{ needs.crate_metadata.outputs.msrv }})
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
|
toolchain: ${{ needs.crate_metadata.outputs.msrv }}
|
||||||
default: true
|
components: clippy
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
components: clippy, rustfmt
|
|
||||||
|
|
||||||
- name: Ensure `cargo fmt` has been run
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: -- --check
|
|
||||||
|
|
||||||
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
|
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo clippy --locked --all-targets ${{ env.MSRV_FEATURES }}
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --locked --all-targets
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test --locked ${{ env.MSRV_FEATURES }}
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --locked
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.job.os }} (${{ matrix.job.target }})
|
name: ${{ matrix.job.target }} (${{ matrix.job.os }})
|
||||||
runs-on: ${{ matrix.job.os }}
|
runs-on: ${{ matrix.job.os }}
|
||||||
|
needs: crate_metadata
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
job:
|
job:
|
||||||
- { os: ubuntu-18.04, target: arm-unknown-linux-gnueabihf , use-cross: true }
|
- { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
||||||
- { os: ubuntu-18.04, target: aarch64-unknown-linux-gnu , use-cross: true }
|
- { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true }
|
||||||
- { os: ubuntu-18.04, target: i686-unknown-linux-gnu , use-cross: true }
|
- { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
|
||||||
- { os: ubuntu-18.04, target: i686-unknown-linux-musl , use-cross: true }
|
- { target: i686-pc-windows-msvc , os: windows-2019 }
|
||||||
- { os: ubuntu-18.04, target: x86_64-unknown-linux-gnu }
|
- { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
||||||
- { os: ubuntu-18.04, target: x86_64-unknown-linux-musl , use-cross: true }
|
- { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
||||||
- { os: macos-12, target: x86_64-apple-darwin }
|
- { target: x86_64-apple-darwin , os: macos-12 }
|
||||||
# - { os: windows-2019, target: i686-pc-windows-gnu } ## disabled; error: linker `i686-w64-mingw32-gcc` not found
|
- { target: x86_64-pc-windows-gnu , os: windows-2019 }
|
||||||
- { os: windows-2019, target: i686-pc-windows-msvc }
|
- { target: x86_64-pc-windows-msvc , os: windows-2019 }
|
||||||
- { os: windows-2019, target: x86_64-pc-windows-gnu }
|
- { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
|
||||||
- { os: windows-2019, target: x86_64-pc-windows-msvc }
|
- { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
|
||||||
|
env:
|
||||||
|
BUILD_CMD: cargo
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install prerequisites
|
- name: Install prerequisites
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
case ${{ matrix.job.target }} in
|
case ${{ matrix.job.target }} in
|
||||||
arm-unknown-linux-gnueabihf) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
|
arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
|
||||||
aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
|
aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
- name: Extract crate information
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "PROJECT_NAME=$(sed -n 's/^name = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV
|
|
||||||
echo "PROJECT_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV
|
|
||||||
echo "PROJECT_MAINTAINER=$(sed -n 's/^authors = \["\(.*\)"\]/\1/p' Cargo.toml)" >> $GITHUB_ENV
|
|
||||||
echo "PROJECT_HOMEPAGE=$(sed -n 's/^homepage = "\(.*\)"/\1/p' Cargo.toml)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
targets: ${{ matrix.job.target }}
|
||||||
target: ${{ matrix.job.target }}
|
|
||||||
override: true
|
- name: Install cross
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
if: matrix.job.use-cross
|
||||||
|
uses: taiki-e/install-action@v2
|
||||||
|
with:
|
||||||
|
tool: cross
|
||||||
|
|
||||||
|
- name: Overwrite build command env variable
|
||||||
|
if: matrix.job.use-cross
|
||||||
|
shell: bash
|
||||||
|
run: echo "BUILD_CMD=cross" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Show version information (Rust, cargo, GCC)
|
- name: Show version information (Rust, cargo, GCC)
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -104,21 +122,16 @@ jobs:
|
|||||||
rustc -V
|
rustc -V
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: actions-rs/cargo@v1
|
shell: bash
|
||||||
with:
|
run: $BUILD_CMD build --locked --release --target=${{ matrix.job.target }}
|
||||||
use-cross: ${{ matrix.job.use-cross }}
|
|
||||||
command: build
|
|
||||||
args: --release --target=${{ matrix.job.target }}
|
|
||||||
|
|
||||||
- name: Run example
|
- name: Run example
|
||||||
uses: actions-rs/cargo@v1
|
if: ${{ !matrix.job.use-cross }}
|
||||||
with:
|
shell: bash
|
||||||
use-cross: ${{ matrix.job.use-cross }}
|
run: $BUILD_CMD run --release --target=${{ matrix.job.target }} --example=simple
|
||||||
command: run
|
|
||||||
args: --release --target=${{ matrix.job.target }} --example=simple
|
|
||||||
|
|
||||||
- name: Strip debug information from executable
|
- name: Set binary name & path
|
||||||
id: strip
|
id: bin
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Figure out suffix of binary
|
# Figure out suffix of binary
|
||||||
@@ -127,31 +140,13 @@ jobs:
|
|||||||
*-pc-windows-*) EXE_suffix=".exe" ;;
|
*-pc-windows-*) EXE_suffix=".exe" ;;
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
# Figure out what strip tool to use if any
|
|
||||||
STRIP="strip"
|
|
||||||
case ${{ matrix.job.target }} in
|
|
||||||
arm-unknown-linux-gnueabihf) STRIP="arm-linux-gnueabihf-strip" ;;
|
|
||||||
aarch64-unknown-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;;
|
|
||||||
*-pc-windows-msvc) STRIP="" ;;
|
|
||||||
esac;
|
|
||||||
|
|
||||||
# Setup paths
|
# Setup paths
|
||||||
BIN_DIR="${{ env.CICD_INTERMEDIATES_DIR }}/stripped-release-bin/"
|
BIN_NAME="${{ needs.crate_metadata.outputs.name }}${EXE_suffix}"
|
||||||
mkdir -p "${BIN_DIR}"
|
BIN_PATH="target/${{ matrix.job.target }}/release/${BIN_NAME}"
|
||||||
BIN_NAME="${{ env.PROJECT_NAME }}${EXE_suffix}"
|
|
||||||
BIN_PATH="${BIN_DIR}/${BIN_NAME}"
|
|
||||||
|
|
||||||
# Copy the release build binary to the result location
|
# Let subsequent steps know where to find the binary
|
||||||
cp "target/${{ matrix.job.target }}/release/${BIN_NAME}" "${BIN_DIR}"
|
echo "BIN_PATH=${BIN_PATH}" >> $GITHUB_OUTPUT
|
||||||
|
echo "BIN_NAME=${BIN_NAME}" >> $GITHUB_OUTPUT
|
||||||
# Also strip if possible
|
|
||||||
if [ -n "${STRIP}" ]; then
|
|
||||||
"${STRIP}" "${BIN_PATH}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Let subsequent steps know where to find the (stripped) bin
|
|
||||||
echo ::set-output name=BIN_PATH::${BIN_PATH}
|
|
||||||
echo ::set-output name=BIN_NAME::${BIN_NAME}
|
|
||||||
|
|
||||||
- name: Set testing options
|
- name: Set testing options
|
||||||
id: test-options
|
id: test-options
|
||||||
@@ -159,44 +154,41 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# test only library unit tests and binary for arm-type targets
|
# test only library unit tests and binary for arm-type targets
|
||||||
unset CARGO_TEST_OPTIONS
|
unset CARGO_TEST_OPTIONS
|
||||||
unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--lib --bin ${PROJECT_NAME}" ;; esac;
|
unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--lib --bin ${{ needs.crate_metadata.outputs.name }}" ;; esac;
|
||||||
echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
|
echo "CARGO_TEST_OPTIONS=${CARGO_TEST_OPTIONS}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
uses: actions-rs/cargo@v1
|
shell: bash
|
||||||
with:
|
run: $BUILD_CMD test --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
|
||||||
use-cross: ${{ matrix.job.use-cross }}
|
|
||||||
command: test
|
|
||||||
args: --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
|
|
||||||
|
|
||||||
- name: Setup Pandoc
|
- name: Setup Pandoc
|
||||||
uses: r-lib/actions/setup-pandoc@v2
|
uses: r-lib/actions/setup-pandoc@v2
|
||||||
|
|
||||||
- name: Generate man page
|
- name: Generate man page
|
||||||
run: pandoc -s -f markdown -t man -o "doc/${{ env.PROJECT_NAME }}.1" "doc/${{ env.PROJECT_NAME }}.1.md"
|
run: pandoc -s -f markdown -t man -o "doc/${{ needs.crate_metadata.outputs.name }}.1" "doc/${{ needs.crate_metadata.outputs.name }}.1.md"
|
||||||
|
|
||||||
- name: Create tarball
|
- name: Create tarball
|
||||||
id: package
|
id: package
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
PKG_suffix=".tar.gz" ; case ${{ matrix.job.target }} in *-pc-windows-*) PKG_suffix=".zip" ;; esac;
|
PKG_suffix=".tar.gz" ; case ${{ matrix.job.target }} in *-pc-windows-*) PKG_suffix=".zip" ;; esac;
|
||||||
PKG_BASENAME=${PROJECT_NAME}-v${PROJECT_VERSION}-${{ matrix.job.target }}
|
PKG_BASENAME=${{ needs.crate_metadata.outputs.name }}-v${{ needs.crate_metadata.outputs.version }}-${{ matrix.job.target }}
|
||||||
PKG_NAME=${PKG_BASENAME}${PKG_suffix}
|
PKG_NAME=${PKG_BASENAME}${PKG_suffix}
|
||||||
echo ::set-output name=PKG_NAME::${PKG_NAME}
|
echo "PKG_NAME=${PKG_NAME}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
PKG_STAGING="${{ env.CICD_INTERMEDIATES_DIR }}/package"
|
PKG_STAGING="${{ env.CICD_INTERMEDIATES_DIR }}/package"
|
||||||
ARCHIVE_DIR="${PKG_STAGING}/${PKG_BASENAME}/"
|
ARCHIVE_DIR="${PKG_STAGING}/${PKG_BASENAME}/"
|
||||||
mkdir -p "${ARCHIVE_DIR}"
|
mkdir -p "${ARCHIVE_DIR}"
|
||||||
|
|
||||||
# Binary
|
# Binary
|
||||||
cp "${{ steps.strip.outputs.BIN_PATH }}" "$ARCHIVE_DIR"
|
cp "${{ steps.bin.outputs.BIN_PATH }}" "$ARCHIVE_DIR"
|
||||||
|
|
||||||
# Man page
|
|
||||||
cp "doc/${{ env.PROJECT_NAME }}.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 "doc/${{ needs.crate_metadata.outputs.name }}.1" "$ARCHIVE_DIR"
|
||||||
|
|
||||||
# base compressed package
|
# base compressed package
|
||||||
pushd "${PKG_STAGING}/" >/dev/null
|
pushd "${PKG_STAGING}/" >/dev/null
|
||||||
case ${{ matrix.job.target }} in
|
case ${{ matrix.job.target }} in
|
||||||
@@ -206,7 +198,7 @@ jobs:
|
|||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
# Let subsequent steps know where to find the compressed package
|
# Let subsequent steps know where to find the compressed package
|
||||||
echo ::set-output name=PKG_PATH::"${PKG_STAGING}/${PKG_NAME}"
|
echo "PKG_PATH=${PKG_STAGING}/${PKG_NAME}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create Debian package
|
- name: Create Debian package
|
||||||
id: debian-package
|
id: debian-package
|
||||||
@@ -218,10 +210,10 @@ jobs:
|
|||||||
DPKG_DIR="${DPKG_STAGING}/dpkg"
|
DPKG_DIR="${DPKG_STAGING}/dpkg"
|
||||||
mkdir -p "${DPKG_DIR}"
|
mkdir -p "${DPKG_DIR}"
|
||||||
|
|
||||||
DPKG_BASENAME=${PROJECT_NAME}
|
DPKG_BASENAME=${{ needs.crate_metadata.outputs.name }}
|
||||||
DPKG_CONFLICTS=${PROJECT_NAME}-musl
|
DPKG_CONFLICTS=${{ needs.crate_metadata.outputs.name }}-musl
|
||||||
case ${{ matrix.job.target }} in *-musl) DPKG_BASENAME=${PROJECT_NAME}-musl ; DPKG_CONFLICTS=${PROJECT_NAME} ;; esac;
|
case ${{ matrix.job.target }} in *-musl) DPKG_BASENAME=${{ needs.crate_metadata.outputs.name }}-musl ; DPKG_CONFLICTS=${{ needs.crate_metadata.outputs.name }} ;; esac;
|
||||||
DPKG_VERSION=${PROJECT_VERSION}
|
DPKG_VERSION=${{ needs.crate_metadata.outputs.version }}
|
||||||
|
|
||||||
unset DPKG_ARCH
|
unset DPKG_ARCH
|
||||||
case ${{ matrix.job.target }} in
|
case ${{ matrix.job.target }} in
|
||||||
@@ -233,14 +225,14 @@ jobs:
|
|||||||
esac;
|
esac;
|
||||||
|
|
||||||
DPKG_NAME="${DPKG_BASENAME}_${DPKG_VERSION}_${DPKG_ARCH}.deb"
|
DPKG_NAME="${DPKG_BASENAME}_${DPKG_VERSION}_${DPKG_ARCH}.deb"
|
||||||
echo ::set-output name=DPKG_NAME::${DPKG_NAME}
|
echo "DPKG_NAME=${DPKG_NAME}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Binary
|
# Binary
|
||||||
install -Dm755 "${{ steps.strip.outputs.BIN_PATH }}" "${DPKG_DIR}/usr/bin/${{ steps.strip.outputs.BIN_NAME }}"
|
install -Dm755 "${{ steps.bin.outputs.BIN_PATH }}" "${DPKG_DIR}/usr/bin/${{ steps.bin.outputs.BIN_NAME }}"
|
||||||
|
|
||||||
# Man page
|
# Man page
|
||||||
install -Dm644 "doc/${{ env.PROJECT_NAME }}.1" "${DPKG_DIR}/usr/share/man/man1/${{ env.PROJECT_NAME }}.1"
|
install -Dm644 'doc/${{ needs.crate_metadata.outputs.name }}.1' "${DPKG_DIR}/usr/share/man/man1/${{ needs.crate_metadata.outputs.name }}.1"
|
||||||
gzip -n --best "${DPKG_DIR}/usr/share/man/man1/${{ env.PROJECT_NAME }}.1"
|
gzip -n --best "${DPKG_DIR}/usr/share/man/man1/${{ needs.crate_metadata.outputs.name }}.1"
|
||||||
|
|
||||||
# README and LICENSE
|
# README and LICENSE
|
||||||
install -Dm644 "README.md" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/README.md"
|
install -Dm644 "README.md" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/README.md"
|
||||||
@@ -251,12 +243,12 @@ jobs:
|
|||||||
|
|
||||||
cat > "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/copyright" <<EOF
|
cat > "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/copyright" <<EOF
|
||||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
Upstream-Name: ${{ env.PROJECT_NAME }}
|
Upstream-Name: ${{ needs.crate_metadata.outputs.name }}
|
||||||
Source: ${{ env.PROJECT_HOMEPAGE }}
|
Source: ${{ needs.crate_metadata.outputs.homepage }}
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
Copyright: ${{ env.PROJECT_MAINTAINER }}
|
Copyright: ${{ needs.crate_metadata.outputs.maintainer }}
|
||||||
Copyright: $COPYRIGHT_YEARS ${{ env.PROJECT_MAINTAINER }}
|
Copyright: $COPYRIGHT_YEARS ${{ needs.crate_metadata.outputs.maintainer }}
|
||||||
License: Apache-2.0 or MIT
|
License: Apache-2.0 or MIT
|
||||||
|
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
@@ -297,16 +289,16 @@ jobs:
|
|||||||
Version: ${DPKG_VERSION}
|
Version: ${DPKG_VERSION}
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: ${{ env.PROJECT_MAINTAINER }}
|
Maintainer: ${{ needs.crate_metadata.outputs.maintainer }}
|
||||||
Homepage: ${{ env.PROJECT_HOMEPAGE }}
|
Homepage: ${{ needs.crate_metadata.outputs.homepage }}
|
||||||
Architecture: ${DPKG_ARCH}
|
Architecture: ${DPKG_ARCH}
|
||||||
Provides: ${{ env.PROJECT_NAME }}
|
Provides: ${{ needs.crate_metadata.outputs.name }}
|
||||||
Conflicts: ${DPKG_CONFLICTS}
|
Conflicts: ${DPKG_CONFLICTS}
|
||||||
Description: colorized hex viewer for the terminal.
|
Description: A command-line benchmarking tool
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
DPKG_PATH="${DPKG_STAGING}/${DPKG_NAME}"
|
DPKG_PATH="${DPKG_STAGING}/${DPKG_NAME}"
|
||||||
echo ::set-output name=DPKG_PATH::${DPKG_PATH}
|
echo "DPKG_PATH=${DPKG_PATH}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# build dpkg
|
# build dpkg
|
||||||
fakeroot dpkg-deb --build "${DPKG_DIR}" "${DPKG_PATH}"
|
fakeroot dpkg-deb --build "${DPKG_DIR}" "${DPKG_PATH}"
|
||||||
@@ -329,7 +321,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
|
unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
|
||||||
echo ::set-output name=IS_RELEASE::${IS_RELEASE}
|
echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Publish archives and packages
|
- name: Publish archives and packages
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ readme = "README.md"
|
|||||||
repository = "https://github.com/sharkdp/hexyl"
|
repository = "https://github.com/sharkdp/hexyl"
|
||||||
version = "0.12.0"
|
version = "0.12.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
rust-version = "1.60"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
|
|||||||
Reference in new issue
Block a user