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 823b069 commit 14dc630
Showing 1 changed file with 45 additions and 38 deletions.
83 changes: 45 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 14dc630

Please sign in to comment.