implement default printer #82
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: Build | |
| on: | |
| push: | |
| branches: ['**'] | |
| pull_request: | |
| branches: ['**'] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| compile: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - name: Linux | |
| os: ubuntu-latest | |
| - name: macOS | |
| os: macos-latest | |
| - name: Windows | |
| os: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cups libcups2-dev libclang-dev | |
| - name: Build | |
| run: cargo build --verbose | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cups libcups2-dev libclang-dev | |
| - name: Lint | |
| run: cargo clippy -- --no-deps -D warnings | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Install PDFium | |
| run: | | |
| PDFIUM_URL="$(curl -fL https://api.github.com/repos/bblanchon/pdfium-binaries/releases/latest | jq -r --arg arch "x64" '.assets[] | select(.name? | match("^pdfium-linux-" + $arch + "\\.tgz$")) | .browser_download_url')" | |
| curl -fL "$PDFIUM_URL" -o pdfium.tgz | |
| tar -xzf pdfium.tgz --strip-components=1 -C target/debug lib/libpdfium.so | |
| - name: Test | |
| run: cargo test --verbose --no-fail-fast | |
| env: | |
| USE_SUDO_LPADMIN: '' |