diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9764bb75..d5e34a51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,15 +31,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 @@ -90,50 +84,75 @@ 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", + } + - { + target: x86_64-pc-windows-msvc, + arch: win64, + os: windows-2019, + build-cmd: "cargo", } - - { target: x86_64-pc-windows-msvc, arch: win64, os: windows-2019 } ## ## NOTE: cannon build for Windows GNU as not supported by cyclors ## - # - { target: x86_64-pc-windows-gnu, arch: win64 , os: windows-2019 } + # - { + # target: x86_64-pc-windows-gnu, + # arch: win64, + # os: windows-2019, + # build-cmd: "cargo", + # } steps: - name: Checkout source code uses: actions/checkout@v4 @@ -164,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-dds > Build - uses: actions-rs/cargo@v1 - with: - use-cross: ${{ matrix.job.use-cross }} - command: build - args: --release --target=${{ matrix.job.target }} -p zenoh-plugin-dds - + run: ${{ matrix.job.build-cmd }} build --release --target=${{ matrix.job.target }} -p zenoh-plugin-dds + - name: zenoh-bridge-dds > Build - uses: actions-rs/cargo@v1 - with: - use-cross: ${{ matrix.job.use-cross }} - command: build - args: --release --target=${{ matrix.job.target }} -p zenoh-bridge-dds + run: ${{ matrix.job.build-cmd }} build --release --target=${{ matrix.job.target }} -p zenoh-bridge-dds - name: zenoh-plugin-dds > 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-dds + run: cargo deb --no-build --target=${{ matrix.job.target }} -p zenoh-plugin-dds - name: zenoh-bridge-dds > 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-dds + run: cargo deb --no-build --target=${{ matrix.job.target }} -p zenoh-bridge-dds - name: Packaging id: package