Skip to content

Commit

Permalink
Don't use cargo@v1
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Dec 18, 2023
1 parent db67e0e commit a8d8071
Showing 1 changed file with 43 additions and 37 deletions.
80 changes: 43 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,9 @@ jobs:
rustup show
rustup component add rustfmt clippy
- name: Code format check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
run: cargo fmt --check
- name: Clippy check
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: cargo clippy -- -D warnings
- name: Environment setup
id: env
shell: bash
Expand Down Expand Up @@ -92,48 +86,72 @@ jobs:
fail-fast: false
matrix:
job:
- { target: x86_64-unknown-linux-gnu, arch: amd64, os: ubuntu-20.04 }
- { target: x86_64-apple-darwin, arch: darwin, os: macos-latest }
- { target: aarch64-apple-darwin, arch: darwin, os: macos-latest }
- {
target: x86_64-unknown-linux-gnu,
arch: amd64,
os: ubuntu-20.04,
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-unknown-linux-musl,
arch: amd64,
os: ubuntu-20.04,
use-cross: true,
build-cmd: "cross",
}
- {
target: arm-unknown-linux-gnueabi,
arch: armel,
os: ubuntu-20.04,
use-cross: true,
build-cmd: "cross",
}
- {
target: arm-unknown-linux-gnueabihf,
arch: armhf,
os: ubuntu-20.04,
use-cross: true,
build-cmd: "cross",
}
- {
target: armv7-unknown-linux-gnueabihf,
arch: armhf,
os: ubuntu-20.04,
use-cross: true,
build-cmd: "cross",
}
- {
target: aarch64-unknown-linux-gnu,
arch: arm64,
os: ubuntu-20.04,
use-cross: true,
build-cmd: "cross",
}
- {
target: aarch64-unknown-linux-musl,
arch: arm64,
os: ubuntu-20.04,
use-cross: true,
build-cmd: "cross",
}
# win is possible to build on, but we don't target it for now
# - { target: x86_64-pc-windows-msvc, arch: win64, os: windows-2019 }
# - { target: x86_64-pc-windows-gnu , arch: win64 , os: windows-2019 }
# - {
# 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,
# build-cmd: "cargo",
# }
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand Down Expand Up @@ -165,38 +183,26 @@ jobs:
;;
esac
cargo install cross --git https://github.com/cross-rs/cross
- name: Install Rust toolchain
run: |
rustup show
rustup target add ${{ matrix.job.target }}
- name: zenoh-plugin-ros1 > Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: build
args: --release --target=${{ matrix.job.target }} -p zenoh-plugin-ros1
run: ${{ matrix.job.build-cmd }} build --release --target=${{ matrix.job.target }} -p zenoh-plugin-ros1

- name: zenoh-bridge-ros1 > Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: build
args: --release --target=${{ matrix.job.target }} -p zenoh-bridge-ros1
run: ${{ matrix.job.build-cmd }} build --release --target=${{ matrix.job.target }} -p zenoh-bridge-ros1

- name: zenoh-plugin-ros1 > Debian package
if: contains(matrix.job.target, '-linux-gnu')
uses: actions-rs/cargo@v1
with:
command: deb
args: --no-build --target=${{ matrix.job.target }} -p zenoh-plugin-ros1
run: cargo deb --no-build --target=${{ matrix.job.target }} -p zenoh-plugin-ros1

- name: zenoh-bridge-ros1 > Debian package
if: contains(matrix.job.target, '-linux-gnu')
uses: actions-rs/cargo@v1
with:
command: deb
args: --no-build --target=${{ matrix.job.target }} -p zenoh-bridge-ros1
run: cargo deb --no-build --target=${{ matrix.job.target }} -p zenoh-bridge-ros1

- name: Packaging
id: package
Expand Down

0 comments on commit a8d8071

Please sign in to comment.