Skip to content

Commit 02223ec

Browse files
committed
chore: Test linux distributable build
1 parent cc8220a commit 02223ec

1 file changed

Lines changed: 117 additions & 0 deletions

File tree

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: "Test Linux Package"
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
test-linux-package:
7+
permissions:
8+
contents: write
9+
runs-on: ubuntu-22.04
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
lfs: true
14+
15+
- name: Verify LFS files
16+
run: |
17+
echo "Checking LFS files..."
18+
ls -la quickview/data/
19+
file quickview/data/globe.vtk
20+
file quickview/data/connectivity.nc
21+
echo "LFS file check complete"
22+
23+
- name: Set up Miniconda
24+
uses: conda-incubator/setup-miniconda@v2
25+
with:
26+
miniconda-version: "latest"
27+
auto-update-conda: true
28+
activate-environment: quickview
29+
environment-file: quickview-env.yml
30+
channel-priority: strict
31+
32+
- name: Install Python dependencies and get version
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install .
36+
# Get version for reference
37+
VERSION=$(python -c "from quickview import __version__; print(__version__)")
38+
echo "VERSION=$VERSION" >> $GITHUB_ENV
39+
echo "Found version: $VERSION"
40+
shell: bash -l {0}
41+
42+
- name: Install system dependencies (Ubuntu)
43+
run: |
44+
sudo apt-get update
45+
sudo apt-get install -y \
46+
libwebkit2gtk-4.0-dev \
47+
libwebkit2gtk-4.1-dev \
48+
libappindicator3-dev \
49+
librsvg2-dev \
50+
patchelf \
51+
libgtk-3-dev \
52+
libayatana-appindicator3-dev \
53+
libsoup2.4-dev \
54+
libjavascriptcoregtk-4.0-dev \
55+
build-essential \
56+
curl \
57+
wget \
58+
file \
59+
libssl-dev \
60+
libgtk-3-0 \
61+
libglib2.0-0 \
62+
libnss3 \
63+
libatk-bridge2.0-0 \
64+
libdrm2 \
65+
libxcomposite1 \
66+
libxdamage1 \
67+
libxfixes3 \
68+
libxrandr2 \
69+
libgbm1 \
70+
libxkbcommon0 \
71+
libasound2
72+
73+
- name: Package using PyInstaller
74+
run: |
75+
chmod +x scripts/setup_tauri.sh
76+
./scripts/setup_tauri.sh
77+
echo "=== Checking PyInstaller output ==="
78+
ls -la src-tauri/binaries/
79+
file src-tauri/binaries/quickview-*
80+
shell: bash -l {0}
81+
82+
- name: Setup Node.js
83+
uses: actions/setup-node@v4
84+
with:
85+
node-version: lts/*
86+
87+
- name: Install Rust stable
88+
uses: dtolnay/rust-toolchain@stable
89+
90+
- name: Build Tauri application
91+
uses: tauri-apps/tauri-action@v0
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
with:
95+
tagName: test-v${{ env.VERSION }}-linux
96+
releaseName: "Test Linux Build v${{ env.VERSION }}"
97+
releaseBody: "Test build for Linux platform"
98+
releaseDraft: true
99+
prerelease: true
100+
101+
- name: Upload artifacts for inspection
102+
if: always()
103+
uses: actions/upload-artifact@v3
104+
with:
105+
name: linux-build-artifacts
106+
path: |
107+
src-tauri/target/release/bundle/
108+
src-tauri/binaries/
109+
retention-days: 7
110+
111+
- name: Display build logs on failure
112+
if: failure()
113+
run: |
114+
echo "=== Cargo build log ==="
115+
cat src-tauri/target/release/build/*/output || true
116+
echo "=== PyInstaller log ==="
117+
find . -name "*.log" -type f -exec echo "File: {}" \; -exec cat {} \;

0 commit comments

Comments
 (0)