Skip to content

Commit

Permalink
test build on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-awd committed Sep 8, 2024
1 parent 645799c commit 0610470
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/build_app_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Test windows build

on:
pull_request:

defaults:
run:
shell: bash

jobs:
build:
runs-on: ${{ matrix.os-target.os }}
strategy:
matrix:
os-target:
- os: windows-latest
target: x86_64-pc-windows-msvc

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Conda (windows)
if: matrix.os-target.os == 'windows-latest'
uses: s-weigand/setup-conda@v1
with:
activate-conda: false

- name: Install pdftotext dependencies (windows)
if: matrix.os-target.os == 'windows-latest'
run: |
conda install -c conda-forge poppler
- name: Install ocrmpdf dependencies (windows)
uses: MinoruSekine/[email protected]
if: matrix.os-target.os == 'windows-latest'
with:
buckets: extras
apps: tesseract pdfquant ghostscript

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.os-target.target }}

- name: Install Statement Sensei dependencies (windows)
if: matrix.os-target.os == 'windows-latest'
uses: ./.github/actions/setup-python-poetry
with:
python-version: "3.11"
poetry-version: "1.8.3"
poetry-install-args: --with main --with build --without dev --extras ocrmypdf

- name: Create executable for tauri (windows)
if: matrix.os-target.os == 'windows-latest'
run: |
poetry run pyinstaller entrypoint.spec
cp dist/entrypoint/entrypoint ./tauri/src-tauri/binaries/statementsensei-${{ matrix.os-target.target }}
cp -r dist/entrypoint/_internal ./tauri/src-tauri/binaries/
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.0.6
run_install: false

- name: Install tauri
working-directory: tauri
run: pnpm install

- name: Build tauri app
working-directory: tauri/src-tauri/
run: pnpm tauri build -t ${{ matrix.os-target.target }}

- name: Upload tauri app
id: artifact_upload
uses: actions/upload-artifact@v4
with:
name: statementsensei-${{ matrix.os-target.target }}
path: compression-level: 9

0 comments on commit 0610470

Please sign in to comment.