fix example and add tk crate #10
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" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ macos-latest, ubuntu-latest ] | |
| rust-version: [ stable, beta, nightly, 1.85 ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup TK/TCL | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install tk-dev | |
| - name: Setup TK/TCL | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install tcl-tk | |
| echo 'export PATH="/usr/local/opt/tcl-tk/bin:$PATH"' >> $GITHUB_ENV | |
| echo 'export LDFLAGS="-L/usr/local/opt/tcl-tk/lib"' >> $GITHUB_ENV | |
| echo 'export CPPFLAGS="-I/usr/local/opt/tcl-tk/include"' >> $GITHUB_ENV | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.rust-version }} | |
| - name: Build | |
| run: cargo build | |
| - name: Run tests | |
| run: cargo test |