@@ -11,10 +11,12 @@ permissions:
1111
1212env :
1313 CARGO_TERM_COLOR : always
14+ CARGO_INCREMENTAL : 0 # Disable incremental for release builds
1415
1516jobs :
1617 create-release :
1718 runs-on : ubuntu-latest
19+ timeout-minutes : 5
1820 outputs :
1921 version : ${{ steps.get_version.outputs.version }}
2022 steps :
3537
3638 ### Features
3739 - Real-time CANopen SDO monitoring and plotting
40+ - TPDO listener with automatic data plotting
3841 - Comprehensive subscription management
3942 - Plot export (PNG screenshots and CSV data)
4043 - Automatic logging with timestamps
5255 **Linux (Generic):**
5356 ```bash
5457 # Extract and run executable
58+ tar xzf canopen-viewer-v${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.tar.gz
59+ cd dist
5560 chmod +x canopen-viewer
5661 ./canopen-viewer
5762 ```
@@ -65,14 +70,15 @@ jobs:
6570 1. Set up your CAN interface (physical or virtual)
6671 2. Run the application
6772 3. Select interface, node ID, and EDS file
68- 4. Start monitoring and subscribe to SDO objects
73+ 4. Start monitoring and subscribe to SDO objects or start TPDO listeners
6974 draft : false
7075 prerelease : false
7176 generate_release_notes : true
7277
7378 build-linux :
7479 needs : create-release
7580 runs-on : ubuntu-latest
81+ timeout-minutes : 30
7682 strategy :
7783 matrix :
7884 target : [x86_64-unknown-linux-gnu]
@@ -81,12 +87,10 @@ jobs:
8187 - name : Checkout code
8288 uses : actions/checkout@v4
8389
84- - name : Set up Rust
85- uses : actions-rs/ toolchain@v1
90+ - name : Install Rust stable
91+ uses : dtolnay/rust- toolchain@stable
8692 with :
87- toolchain : stable
88- target : ${{ matrix.target }}
89- override : true
93+ targets : ${{ matrix.target }}
9094
9195 - name : Install system dependencies
9296 run : |
@@ -100,17 +104,21 @@ jobs:
100104 pkg-config \
101105 build-essential
102106
107+ # CRITICAL: Cache Cargo to avoid rebuilding dependencies
108+ - name : Cache Cargo
109+ uses : Swatinem/rust-cache@v2
110+ with :
111+ shared-key : " canopen-viewer-release"
112+ cache-on-failure : false
113+
103114 - name : Update version in Cargo.toml
104115 run : |
105116 sed -i 's/version = "0\.1\.0"/version = "${{ needs.create-release.outputs.version }}"/' canopen-viewer/Cargo.toml
106117 sed -i 's/version = "0\.1\.0"/version = "${{ needs.create-release.outputs.version }}"/' canopen-common/Cargo.toml
107118 sed -i 's/version = "0\.1\.0"/version = "${{ needs.create-release.outputs.version }}"/' mock-canopen-node/Cargo.toml
108119
109120 - name : Build release binary
110- uses : actions-rs/cargo@v1
111- with :
112- command : build
113- args : --release --target ${{ matrix.target }} -p canopen-viewer
121+ run : cargo build --release --target ${{ matrix.target }} -p canopen-viewer
114122
115123 - name : Create binary archive
116124 run : |
@@ -129,16 +137,14 @@ jobs:
129137 build-deb-package :
130138 needs : create-release
131139 runs-on : ubuntu-latest
140+ timeout-minutes : 30
132141
133142 steps :
134143 - name : Checkout code
135144 uses : actions/checkout@v4
136145
137- - name : Set up Rust
138- uses : actions-rs/toolchain@v1
139- with :
140- toolchain : stable
141- override : true
146+ - name : Install Rust stable
147+ uses : dtolnay/rust-toolchain@stable
142148
143149 - name : Install system dependencies
144150 run : |
@@ -154,17 +160,21 @@ jobs:
154160 dpkg-dev \
155161 fakeroot
156162
163+ # CRITICAL: Cache Cargo for deb builds too
164+ - name : Cache Cargo
165+ uses : Swatinem/rust-cache@v2
166+ with :
167+ shared-key : " canopen-viewer-deb"
168+ cache-on-failure : false
169+
157170 - name : Update version in Cargo.toml
158171 run : |
159172 sed -i 's/version = "0\.1\.0"/version = "${{ needs.create-release.outputs.version }}"/' canopen-viewer/Cargo.toml
160173 sed -i 's/version = "0\.1\.0"/version = "${{ needs.create-release.outputs.version }}"/' canopen-common/Cargo.toml
161174 sed -i 's/version = "0\.1\.0"/version = "${{ needs.create-release.outputs.version }}"/' mock-canopen-node/Cargo.toml
162175
163176 - name : Build release binary
164- uses : actions-rs/cargo@v1
165- with :
166- command : build
167- args : --release -p canopen-viewer
177+ run : cargo build --release -p canopen-viewer
168178
169179 - name : Create .deb package structure
170180 run : |
@@ -216,4 +226,4 @@ jobs:
216226 - name : Upload .deb package
217227 uses : softprops/action-gh-release@v1
218228 with :
219- files : ./debian/canopen-viewer_${{ needs.create-release.outputs.version }}_amd64.deb
229+ files : ./debian/canopen-viewer_${{ needs.create-release.outputs.version }}_amd64.deb
0 commit comments