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

Check markdown #36

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c647d2b
Use GitHub-hosted runners everywhere
fuzzypixelz Oct 24, 2024
d1d93b4
Use Cargo workspace version
fuzzypixelz Oct 24, 2024
434cd99
Remove ZettaScaleLabs references
fuzzypixelz Oct 24, 2024
9c4ee8b
Install wireshark dependency in tag job
fuzzypixelz Oct 29, 2024
f42983f
Install wireshark dependency in builds job
fuzzypixelz Oct 29, 2024
34530f4
Use windows-2019, remove gsudo use
fuzzypixelz Oct 29, 2024
a11f3d8
Remove gsudo use in CI workflow
fuzzypixelz Oct 29, 2024
68d35b0
Rename artifacts
fuzzypixelz Oct 29, 2024
04cabdd
Use windows-2022 for release build
fuzzypixelz Oct 29, 2024
ccc5bfc
Update zenoh
fuzzypixelz Oct 29, 2024
965789a
Fix missing double quote
fuzzypixelz Oct 29, 2024
8fe1152
Fix typo in `GITHUB_OUPUT`
fuzzypixelz Oct 29, 2024
c30242c
Only run windows worklfow on windows-2022
fuzzypixelz Oct 29, 2024
6f6a01c
Use 7zip instead of zip on windows-2022
fuzzypixelz Oct 29, 2024
4297304
Set `draft` and `prerelease` to false in release workflow
fuzzypixelz Oct 29, 2024
c7f35e8
Merge pull request #1 from eclipse-zenoh/migrate-to-eclipse-zenoh
fuzzypixelz Oct 29, 2024
4e303c2
build: Sync with eclipse-zenoh/zenoh@1a4a295 from 2024-10-28 (#2)
eclipse-zenoh-bot Oct 29, 2024
7b38da1
build: Sync with eclipse-zenoh/zenoh@b1c0a6b from 2024-10-30 (#3)
eclipse-zenoh-bot Oct 31, 2024
e3a2296
build: Sync with eclipse-zenoh/zenoh@bb24e95 from 2024-10-31 (#5)
eclipse-zenoh-bot Oct 31, 2024
121d2b4
fix: pass tag_name to action-gh-release
diogomatsubara Oct 31, 2024
ab72afc
Merge pull request #6 from diogomatsubara/fix-release-workflow
Mallets Oct 31, 2024
1c81392
chore: update auto release generation template
diogomatsubara Oct 31, 2024
a54ee1d
Merge pull request #7 from diogomatsubara/update-release-notes-template
Mallets Oct 31, 2024
8708161
chore: add check-labels.yml workflow
diogomatsubara Oct 31, 2024
26044c8
Merge pull request #8 from diogomatsubara/add-check-labels
Mallets Oct 31, 2024
1fa51be
build: Sync with eclipse-zenoh/zenoh@bb24e95 from 2024-10-31 (#9)
eclipse-zenoh-bot Nov 3, 2024
244e9aa
build: Sync with eclipse-zenoh/zenoh@e73a89d from 2024-11-04 (#10)
eclipse-zenoh-bot Nov 5, 2024
b6f18cc
build: Sync with eclipse-zenoh/zenoh@840ee73 from 2024-11-06 (#11)
eclipse-zenoh-bot Nov 7, 2024
ded6da2
build: Sync with eclipse-zenoh/zenoh@03b2f7a from 2024-11-07 (#12)
eclipse-zenoh-bot Nov 7, 2024
e86cf83
build: Sync with eclipse-zenoh/zenoh@7159acf from 2024-11-07 (#13)
eclipse-zenoh-bot Nov 7, 2024
04b24dc
build: Sync with eclipse-zenoh/zenoh@3d86ed4 from 2024-11-08 (#14)
eclipse-zenoh-bot Nov 8, 2024
2dd0959
build: Sync with eclipse-zenoh/zenoh@da11732 from 2024-11-08 (#15)
eclipse-zenoh-bot Nov 9, 2024
1f20d57
build: Sync with eclipse-zenoh/zenoh@99d062e from 2024-11-13 (#16)
eclipse-zenoh-bot Nov 14, 2024
9aaab12
build: Sync with eclipse-zenoh/zenoh@453b7b8 from 2024-11-15 (#17)
eclipse-zenoh-bot Nov 16, 2024
36b2b6a
build: Sync with eclipse-zenoh/zenoh@924394c from 2024-11-19 (#18)
eclipse-zenoh-bot Nov 20, 2024
f0077c5
build: Sync with eclipse-zenoh/zenoh@3404e05 from 2024-11-20 (#19)
eclipse-zenoh-bot Nov 21, 2024
d35c334
Use the current version in the release note. (#20)
evshary Nov 21, 2024
c0148e6
build: Sync with eclipse-zenoh/zenoh@9a84e6d from 2024-11-22 (#21)
eclipse-zenoh-bot Nov 23, 2024
b9f5084
build: Sync with eclipse-zenoh/zenoh@a75d2a1 from 2024-11-25 (#22)
eclipse-zenoh-bot Nov 26, 2024
7082d5b
build: Sync with eclipse-zenoh/zenoh@075f2ad from 2024-11-26 (#23)
eclipse-zenoh-bot Nov 27, 2024
9f4ddcc
build: Sync with eclipse-zenoh/zenoh@7e044ad from 2024-11-28 (#24)
eclipse-zenoh-bot Nov 29, 2024
4733f3e
build: Sync with eclipse-zenoh/zenoh@c764bf9 from 2024-11-29 (#25)
eclipse-zenoh-bot Nov 30, 2024
7475ddd
build: Sync with eclipse-zenoh/zenoh@549bc7b from 2024-12-02 (#26)
eclipse-zenoh-bot Dec 3, 2024
6106d98
build: Sync with eclipse-zenoh/zenoh@9a73585 from 2024-12-03 (#27)
eclipse-zenoh-bot Dec 4, 2024
0a52591
build: Sync with eclipse-zenoh/zenoh@b3ccf82 from 2024-12-04 (#28)
eclipse-zenoh-bot Dec 5, 2024
874e04e
build: Sync with eclipse-zenoh/zenoh@64e8caa from 2024-12-05 (#29)
eclipse-zenoh-bot Dec 5, 2024
64a0cb8
build: Sync with eclipse-zenoh/zenoh@2332406 from 2024-12-06 (#30)
eclipse-zenoh-bot Dec 7, 2024
1d4968c
build: Sync with eclipse-zenoh/zenoh@2332406 from 2024-12-06 (#31)
eclipse-zenoh-bot Dec 8, 2024
0f6605b
build: Sync with eclipse-zenoh/zenoh@37491bb from 2024-12-09 (#32)
eclipse-zenoh-bot Dec 10, 2024
73003e4
build: Sync with eclipse-zenoh/zenoh@fb2d2bc from 2024-12-10 (#33)
eclipse-zenoh-bot Dec 11, 2024
963d1eb
build: Sync with eclipse-zenoh/zenoh@df86f75 from 2024-12-11 (#34)
eclipse-zenoh-bot Dec 11, 2024
5f9c1d8
build: Sync with eclipse-zenoh/zenoh@cc201aa from 2024-12-11 (#35)
eclipse-zenoh-bot Dec 11, 2024
e10d36c
build: Sync with eclipse-zenoh/zenoh@77923a2 from 2024-12-12 (#36)
eclipse-zenoh-bot Dec 13, 2024
5de1bdd
build: Sync with eclipse-zenoh/zenoh@77923a2 from 2024-12-12 (#37)
eclipse-zenoh-bot Dec 17, 2024
861ea90
build: Sync with eclipse-zenoh/zenoh@3744075 from 2024-12-17 (#39)
eclipse-zenoh-bot Dec 18, 2024
7e9c151
Add CI for checking markdown format.
evshary Dec 18, 2024
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
12 changes: 11 additions & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,22 @@

changelog:
categories:
- title: Breaking changes 💥
labels:
- breaking-change
- title: New features 🎉
labels:
- enhancement
- new feature
- title: Bug fixes 🐞
labels:
- bug
- title: Documentation 📝
labels:
- documentation
- title: Dependencies 👷
labels:
- dependencies
- title: Other changes
labels:
- "*"
- "*"
15 changes: 15 additions & 0 deletions .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Check required labels

on:
pull_request_target:
types: [opened, synchronize, reopened, labeled]
branches: ["**"]

jobs:
check-labels:
name: Check PR labels
uses: eclipse-zenoh/ci/.github/workflows/check-labels.yml@main
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
permissions:
pull-requests: write
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
schedule:
- cron: "0 6 * * 1-5"

jobs:
markdown_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v18
with:
config: '.markdownlint.yaml'
globs: '**/README.md'
28 changes: 5 additions & 23 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,26 @@ env:

jobs:
check:
name: Run checks on self-hosted macOS
runs-on: [ self-hosted, macOS ]
name: Run checks on macOS
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Code format check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
run: cargo fmt -- --check

- name: Install Wireshark
run: |
brew install --cask wireshark
ln -snf $(find /Applications/Wireshark.app/Contents/Frameworks -name "libwireshark.*.dylib" | tail -n 1) libwireshark.dylib

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings
run: cargo clippy --all-targets -- --deny warnings

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
run: cargo build --release

- name: Place the plugin
run: |
Expand All @@ -71,9 +59,3 @@ jobs:
- name: Test the sample data
run: |
[ $(tshark -r assets/sample-data.pcap | grep Zenoh | wc -l) -eq 7 ] || return 1

- name: Clean up
if: always()
uses: actions-rs/cargo@v1
with:
command: clean
10 changes: 5 additions & 5 deletions .github/workflows/release-note.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ Download and extract the corresponding zip file
### Linux

```bash
mkdir -p ~/.local/lib/wireshark/plugins/4.2/epan
cp libzenoh_dissector.so ~/.local/lib/wireshark/plugins/4.2/epan/libzenoh_dissector.so
mkdir -p ~/.local/lib/wireshark/plugins/4.4/epan
cp libzenoh_dissector.so ~/.local/lib/wireshark/plugins/4.4/epan/libzenoh_dissector.so
```

### macOS

```bash
mkdir -p ~/.local/lib/wireshark/plugins/4-2/epan
cp libzenoh_dissector.so ~/.local/lib/wireshark/plugins/4-2/epan/libzenoh_dissector.so
mkdir -p ~/.local/lib/wireshark/plugins/4-4/epan
cp libzenoh_dissector.so ~/.local/lib/wireshark/plugins/4-4/epan/libzenoh_dissector.so
```

### Windows

```powershell
$${empty}epan_dir = "$${empty}Env:APPDATA\Wireshark\plugins\4.2\epan"
$${empty}epan_dir = "$${empty}Env:APPDATA\Wireshark\plugins\4.4\epan"
if (-Not (Test-Path $${empty}epan_dir)) {
mkdir -p $${empty}epan_dir
}
Expand Down
150 changes: 114 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,109 @@ name: Release
on:
schedule:
- cron: "0 0 * * 1-5"
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:
inputs:
live-run:
type: boolean
description: Live-run
required: false
default: false
version:
type: string
description: Release number
required: false
zenoh-version:
type: string
description: Zenoh Release number
required: false
branch:
type: string
description: Release branch
required: false

jobs:
tag:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.create-release-branch.outputs.version }}
branch: ${{ steps.create-release-branch.outputs.branch }}
steps:
- name: Install dependencies
run: |
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:wireshark-dev/stable
sudo apt install -y wireshark-dev
sudo apt install -y --allow-change-held-packages wireshark

- id: create-release-branch
uses: eclipse-zenoh/ci/create-release-branch@main
with:
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run }}
version: ${{ inputs.version }}
branch: ${{ inputs.branch }}
github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }}

- uses: eclipse-zenoh/ci/bump-crates@main
with:
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run }}
version: ${{ steps.create-release-branch.outputs.version }}
branch: ${{ steps.create-release-branch.outputs.branch }}
bump-deps-pattern: ${{ inputs.zenoh-version && 'zenoh.*' || '^$' }}
bump-deps-version: ${{ inputs.zenoh-version }}
bump-deps-branch: ${{ inputs.zenoh-version && format('release/{0}', inputs.zenoh-version) || '' }}
github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }}

builds:
name: Build for ${{ matrix.job.target }} on ${{ matrix.job.os }}
runs-on: [ self-hosted, "${{ matrix.job.os }}" ]
name: Build for ${{ matrix.build.target }} on ${{ matrix.build.os }}
runs-on: ${{ matrix.build.os }}
needs: tag
strategy:
fail-fast: false
matrix:
job:
- { target: x86_64-unknown-linux-gnu, arch: amd64, os: ubuntu-20.04 }
- { target: aarch64-apple-darwin, arch: darwin, os: macos }
- { target: x86_64-pc-windows-msvc, arch: win64, os: windows-10 }
build:
- { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04 }
- { target: aarch64-apple-darwin, os: macos-14 }
- { target: x86_64-pc-windows-msvc, os: windows-2022 }

steps:
- if: contains(matrix.build.os, 'ubuntu')
name: Install dependencies (Ubuntu)
run: |
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:wireshark-dev/stable
sudo apt install -y wireshark-dev
sudo apt install -y --allow-change-held-packages wireshark

- if: contains(matrix.build.os, 'windows')
name: Install dependencies (Windows)
run: |
$installed = (choco list -l -r --id-only) -join " "
$install_list = @("xsltproc", "docbook-bundle", "nsis", "winflexbison3", "cmake", "7zip")
ForEach ($pkg in $install_list.split(" ")) {
if (-Not ($installed.contains($pkg))) {
choco install -y --force --no-progress $pkg
}
}
choco install -y --no-progress wireshark --version 4.2.0

- if: contains(matrix.build.os, 'macos')
name: Install dependencies (macOS)
run: |
brew install --cask wireshark
ln -snf $(find /Applications/Wireshark.app/Contents/Frameworks -name "libwireshark.*.dylib" | tail -n 1) libwireshark.dylib

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.tag.outputs.branch }}

- name: Setup the Wireshark library
id: wireshark_lib
id: wireshark-lib
shell: bash
run: |
case ${{ matrix.job.target }} in
case ${{ matrix.build.target }} in
*linux*)
echo "WIRESHARK_LIB_DIR=" >> $GITHUB_OUTPUT
;;
Expand All @@ -56,58 +133,58 @@ jobs:
esac

- name: Build
if: ${{! contains(matrix.job.target, 'windows') }}
uses: actions-rs/cargo@v1
with:
command: build
args: --release
if: ${{! contains(matrix.build.target, 'windows') }}
run: cargo build --release
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
WIRESHARK_LIB_DIR: ${{ steps.wireshark_lib.outputs.WIRESHARK_LIB_DIR }}
WIRESHARK_LIB_DIR: ${{ steps.wireshark-lib.outputs.WIRESHARK_LIB_DIR }}

- name: Build from source on Windows
if: contains(matrix.job.target, 'windows')
uses: actions-rs/cargo@v1
with:
command: build
args: --release
if: contains(matrix.build.target, 'windows')
run: cargo build --release
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

- name: Packaging
id: package
shell: bash
run: |
PKG_NAME="${GITHUB_WORKSPACE}/${{ matrix.job.target }}.zip"
echo "Packaging ${PKG_NAME}:"
case ${{ matrix.job.target }} in
PKG_NAME="zenoh-dissector-${{ needs.tag.outputs.version }}-${{ matrix.build.target }}-standalone.zip"
PKG_PATH="${GITHUB_WORKSPACE}/${{ matrix.build.target }}.zip"
echo "Packaging ${PKG_PATH}:"
case ${{ matrix.build.target }} in
*linux*)
zip -j ${PKG_NAME} target/release/libzenoh_dissector.so
zip -j ${PKG_PATH} target/release/libzenoh_dissector.so
;;
*apple*)
mv target/release/libzenoh_dissector.dylib target/release/libzenoh_dissector.so
zip -j ${PKG_NAME} target/release/libzenoh_dissector.so
zip -j ${PKG_PATH} target/release/libzenoh_dissector.so
;;
*windows*)
PKG_NAME="${PKG_NAME//\\//}"
zip -j ${PKG_NAME} target/release/zenoh_dissector.dll
PKG_PATH="${PKG_PATH//\\//}"
7z -y a ${PKG_PATH} target/release/zenoh_dissector.dll
;;
esac
echo "name=$PKG_NAME" >> "$GITHUB_OUTPUT"
echo "path=$PKG_PATH" >> "$GITHUB_OUTPUT"

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.job.target }}
path: ${{ matrix.job.target }}.zip
name: ${{ steps.package.outputs.name }}
path: ${{ steps.package.outputs.path }}
if-no-files-found: error

publish:
if: ${{ inputs.live-run || false }}
name: Release publication
needs: builds
runs-on: [ self-hosted, ubuntu-20.04 ]
needs: [tag, builds]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.tag.outputs.branch }}

- name: Download the artifacts of previous builds
uses: actions/download-artifact@v4
Expand All @@ -133,11 +210,12 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: true
draft: false
prerelease: false
files: ARTIFACTS/*/*.zip
generate_release_notes: true
body_path: release-note.md
append_body: true
tag_name: ${{ inputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN_WORKFLOW }}
Loading