Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Release workflow #734

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 50 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ on:
description: "build with specified features (comma separated, no space)"
type: string

env:
VERSION_CROSS: 0.2.4
VERSION_CARGO_DEB: 1.44.1
VERSION_CARGO_NEXTEST: 0.9.67
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If versions are hardcoded in the .release.yml what would the update procedure be?
I.e.: when and how those version numbers are updated?


jobs:
checks:
name: Code checks
Expand Down Expand Up @@ -130,7 +135,7 @@ jobs:
run: rustup show

- name: Install nextest
run: cargo install cargo-nextest --locked
run: cargo install --version ${{ env.VERSION_CARGO_NEXTEST }} --locked cargo-nextest
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

Expand Down Expand Up @@ -177,9 +182,24 @@ jobs:
fail-fast: false
matrix:
job:
- { target: x86_64-unknown-linux-gnu, arch: amd64, os: ubuntu-20.04, build-cmd: "cargo" }
- { target: x86_64-unknown-linux-musl, arch: amd64, os: ubuntu-20.04, build-cmd: "cross" }
- { target: arm-unknown-linux-gnueabi, arch: armel, os: ubuntu-20.04, build-cmd: "cross" }
- {
target: x86_64-unknown-linux-gnu,
arch: amd64,
os: ubuntu-20.04,
build-cmd: "cargo",
}
- {
target: x86_64-unknown-linux-musl,
arch: amd64,
os: ubuntu-20.04,
build-cmd: "cross",
}
- {
target: arm-unknown-linux-gnueabi,
arch: armel,
os: ubuntu-20.04,
build-cmd: "cross",
}
- {
target: arm-unknown-linux-gnueabihf,
arch: armhf,
Expand All @@ -192,16 +212,36 @@ jobs:
os: ubuntu-20.04,
build-cmd: "cross",
}
- { target: aarch64-unknown-linux-gnu, arch: arm64, os: ubuntu-20.04, build-cmd: "cross" }
- {
target: aarch64-unknown-linux-gnu,
arch: arm64,
os: ubuntu-20.04,
build-cmd: "cross",
}
- {
target: aarch64-unknown-linux-musl,
arch: arm64,
os: ubuntu-20.04,
build-cmd: "cross",
}
- { target: x86_64-apple-darwin, arch: darwin, os: macos-latest, build-cmd: "cargo" }
- { target: aarch64-apple-darwin, arch: darwin, os: macos-latest, build-cmd: "cargo" }
- { target: x86_64-pc-windows-msvc, arch: win64, os: windows-2019, build-cmd: "cargo" }
- {
target: x86_64-apple-darwin,
arch: darwin,
os: macos-latest,
build-cmd: "cargo",
}
- {
target: aarch64-apple-darwin,
arch: darwin,
os: macos-latest,
build-cmd: "cargo",
}
- {
target: x86_64-pc-windows-msvc,
arch: win64,
os: windows-2019,
build-cmd: "cargo",
}
# - { target: x86_64-pc-windows-gnu , arch: win64 , os: windows-2019 }
steps:
- name: Checkout source code
Expand All @@ -217,7 +257,7 @@ jobs:
shell: bash
run: |
case ${{ matrix.job.target }} in
*-linux-gnu*) cargo install cargo-deb ;;
*-linux-gnu*) cargo install --version ${{ env.VERSION_CARGO_DEB }} cargo-deb ;;
esac

case ${{ matrix.job.target }} in
Expand All @@ -235,7 +275,7 @@ jobs:
;;
esac

cargo install cross --git https://github.com/cross-rs/cross
cargo install --version ${{ env.VERSION_CROSS }} cross

- name: Install Rust toolchain
run: |
Expand Down Expand Up @@ -282,7 +322,6 @@ jobs:
# check if debian packages has been created and packages them in a single tgz
if [[ -d target/${TARGET}/debian ]]; then
cd target/${TARGET}/debian
${GITHUB_WORKSPACE}/gen_zenoh_deb.sh ${{ needs.checks.outputs.ZENOH_VERSION }} ${{ matrix.job.arch }}
echo "Packaging ${DEBS_PKG_NAME}:"
zip ${DEBS_PKG_NAME} *.deb
cd -
Expand Down