Skip to content

Commit

Permalink
Merge branch 'master' into simplified_load_plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Jan 9, 2024
2 parents 4ef1d73 + ed264cc commit 5dcd127
Show file tree
Hide file tree
Showing 7 changed files with 428 additions and 184 deletions.
105 changes: 56 additions & 49 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,15 @@ jobs:
name: Code checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust toolchain
run: |
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,53 +84,78 @@ 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@v2
uses: actions/checkout@v4
with:
fetch-depth: 500 # NOTE: get long history for git-version crate to correctly compute a version
- name: Fetch Git tags # NOTE: workaround for https://github.com/actions/checkout/issues/290
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 Expand Up @@ -249,7 +256,7 @@ jobs:
esac
- name: "Upload packages"
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.job.target }}
path: |
Expand All @@ -262,14 +269,14 @@ jobs:
needs: [checks, builds]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 500 # NOTE: get long history for git-version crate to correctly compute a version
- name: Fetch Git tags # NOTE: workaround for https://github.com/actions/checkout/issues/290
shell: bash
run: git fetch --tags --force
- name: Download packages from previous job
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
path: PACKAGES
- name: Unzip PACKAGES
Expand All @@ -281,19 +288,19 @@ jobs:
unzip PACKAGES/aarch64-unknown-linux-musl/zenoh-bridge-dds-${{ needs.checks.outputs.PKG_VERSION }}-aarch64-unknown-linux-musl.zip -d docker/linux/arm64/
tree docker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Docker meta - set tags and labels
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: eclipse/zenoh-bridge-dds
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_COM_USERNAME }}
password: ${{ secrets.DOCKER_COM_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
Expand All @@ -309,7 +316,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download result of previous builds
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
path: ARTIFACTS
- name: Publish as github release
Expand Down Expand Up @@ -339,7 +346,7 @@ jobs:
scp -o "StrictHostKeyChecking=no" -r * ${SSH_TARGET}:${DOWNLOAD_DIR}/
echo "---- cleanup identity"
ssh-add -D
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust toolchain
run: rustup show
- name: Publish to crates.io
Expand Down
37 changes: 8 additions & 29 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install ACL
if: startsWith(matrix.os,'ubuntu')
Expand All @@ -44,43 +44,22 @@ jobs:
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
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --examples -- -D warnings
run: cargo clippy --all --examples -- -D warnings

- name: Build zenoh-plugin-dds
uses: actions-rs/cargo@v1
with:
command: build
args: -p zenoh-plugin-dds --verbose --all-targets
run: cargo build -p zenoh-plugin-dds --verbose --all-targets

- name: Build zenoh-plugin-dds (with dds_shm)
uses: actions-rs/cargo@v1
with:
command: build
args: -p zenoh-plugin-dds --features dds_shm --verbose --all-targets
run: cargo build -p zenoh-plugin-dds --features dds_shm --verbose --all-targets

- name: Build zenoh-bridge-dds
uses: actions-rs/cargo@v1
with:
command: build
args: -p zenoh-bridge-dds --verbose --all-targets
run: cargo build -p zenoh-bridge-dds --verbose --all-targets

- name: Build zenoh-bridge-dds (with dds_shm)
uses: actions-rs/cargo@v1
with:
command: build
args: -p zenoh-bridge-dds --features dds_shm --verbose --all-targets
run: cargo build -p zenoh-bridge-dds --features dds_shm --verbose --all-targets

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose
run: cargo test --verbose
Loading

0 comments on commit 5dcd127

Please sign in to comment.