add support for "serial atuo di" #693
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - "src/**" | |
| - "devices/**" | |
| - ".github/workflows/rust.yml" | |
| pull_request: | |
| paths: | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - "src/**" | |
| - "devices/**" | |
| - ".github/workflows/rust.yml" | |
| workflow_dispatch: | |
| release: | |
| types: [created] | |
| schedule: | |
| - cron: "0 14 * * *" # Daily at 2 PM UTC | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.artifact }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| artifact: win-x64 | |
| ext: .exe | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| artifact: linux-x64 | |
| ext: "" | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| artifact: linux-aarch64 | |
| ext: "" | |
| cross: true | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| artifact: macos-arm64 | |
| ext: "" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cargo-zigbuild | |
| if: matrix.cross | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-zigbuild | |
| - name: Install Zig | |
| if: matrix.cross | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.13.0 | |
| - name: Build (native) | |
| if: ${{ !matrix.cross }} | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Build (cross) | |
| if: matrix.cross | |
| run: cargo zigbuild --release --target ${{ matrix.target }} | |
| - name: Run tests | |
| if: ${{ !matrix.cross }} | |
| run: cargo test --release --target ${{ matrix.target }} | |
| - name: Run help | |
| if: ${{ !matrix.cross }} | |
| run: cargo run --release --target ${{ matrix.target }} -- --help | |
| - name: Prepare artifact | |
| shell: bash | |
| run: | | |
| mkdir -p wchisp-${{ matrix.artifact }} | |
| cp target/${{ matrix.target }}/release/wchisp${{ matrix.ext }} wchisp-${{ matrix.artifact }}/ | |
| cp README.md wchisp-${{ matrix.artifact }}/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wchisp-${{ matrix.artifact }} | |
| path: wchisp-${{ matrix.artifact }} | |
| - name: Create release archive | |
| if: github.event_name == 'release' | |
| shell: bash | |
| run: | | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| 7z a -tzip wchisp-${{ github.event.release.tag_name }}-${{ matrix.artifact }}.zip wchisp-${{ matrix.artifact }} | |
| else | |
| tar -czvf wchisp-${{ github.event.release.tag_name }}-${{ matrix.artifact }}.tar.gz wchisp-${{ matrix.artifact }} | |
| fi | |
| - name: Upload release asset | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| fail_on_unmatched_files: false | |
| files: | | |
| wchisp-*.tar.gz | |
| wchisp-*.zip | |
| nightly-release: | |
| name: Nightly Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'schedule' | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./ | |
| - name: Create archives | |
| run: | | |
| for dir in wchisp-*/; do | |
| name="${dir%/}" | |
| echo "Compressing $name" | |
| if [[ $name == wchisp-win* ]]; then | |
| zip -r "$name.zip" "$name" | |
| else | |
| tar -czvf "$name.tar.gz" "$name" | |
| fi | |
| done | |
| - name: Update nightly release | |
| uses: andelf/nightly-release@main | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: nightly | |
| name: "wchisp nightly release $$" | |
| draft: false | |
| prerelease: true | |
| body: | | |
| This is a nightly binary release of the wchisp command line tool. | |
| files: | | |
| wchisp-*.tar.gz | |
| wchisp-*.zip |