Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
a5huynh committed Apr 3, 2023
2 parents c86c149 + bc0bc1b commit a336ae9
Show file tree
Hide file tree
Showing 94 changed files with 5,134 additions and 1,923 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,17 @@ jobs:
run: |
echo "target_arch=$(rustc -Vv | grep host | awk '{print $2 " "}')" >> $GITHUB_ENV
echo "target_ext=" >> $GITHUB_ENV
echo "target_os_name=linux" >> $GITHUB_ENV
- name: Setup arch target (windows only)
if: ${{startsWith(matrix.platform, 'windows')}}
run: |
echo "target_arch=x86_64-pc-windows-msvc" >> $env:GITHUB_ENV
echo "target_ext=.exe" >> $env:GITHUB_ENV
echo "target_os_name=win" >> $env:GITHUB_ENV
- name: Setup arch target (mac only)
if: matrix.platform == 'macos-latest'
run: |
echo "target_os_name=mac" >> $GITHUB_ENV
# Build stuff
- name: build sidecar (windows/linux)
if: ${{ matrix.platform == 'windows-latest' || startsWith(matrix.platform, 'ubuntu') }}
Expand All @@ -74,6 +80,7 @@ jobs:
mkdir -p crates/tauri/binaries
cp target/release/spyglass${{ env.target_ext }} crates/tauri/binaries/spyglass-server-${{ env.target_arch }}${{ env.target_ext }}
cp target/release/spyglass-debug${{ env.target_ext }} crates/tauri/binaries/spyglass-debug-${{ env.target_arch }}${{ env.target_ext }}
cp utils/${{ env.target_os_name }}/pdftotext${{ env.target_ext }} crates/tauri/binaries/pdftotext-${{ env.target_arch }}${{ env.target_ext }}
- name: build sidecar (macos)
if: matrix.platform == 'macos-latest'
run: |
Expand All @@ -87,13 +94,16 @@ jobs:
cp target/x86_64-apple-darwin/release/spyglass-debug crates/tauri/binaries/spyglass-debug-x86_64-apple-darwin;
cp target/aarch64-apple-darwin/release/spyglass-debug crates/tauri/binaries/spyglass-debug-aarch64-apple-darwin;
cp utils/mac/pdftotext crates/tauri/binaries/pdftotext-universal-apple-darwin;
lipo -create -output crates/tauri/binaries/spyglass-server-universal-apple-darwin \
target/x86_64-apple-darwin/release/spyglass \
target/aarch64-apple-darwin/release/spyglass;
lipo -create -output crates/tauri/binaries/spyglass-debug-universal-apple-darwin \
target/x86_64-apple-darwin/release/spyglass-debug \
target/aarch64-apple-darwin/release/spyglass-debug;
- name: build default plugins
run: make build-plugins-release
- name: import windows certificate
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ jobs:
# Cleanup Disk
- name: Cleanup Disk
run: |
df -h
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
df -h
df -h;
sudo rm -rf /usr/local/lib/android;
sudo rm -rf /usr/share/dotnet;
df -h
# Setup arch target for sidecar build
- name: Setup arch target
run: echo "target_arch=$(rustc -Vv | grep host | awk '{print $2 " "}')" >> $GITHUB_ENV
run: |
echo "target_arch=$(rustc -Vv | grep host | awk '{print $2 " "}')" >> $GITHUB_ENV;
echo "target_ext=" >> $GITHUB_ENV;
echo "target_os_name=linux" >> $GITHUB_ENV;
# Setup rust toolchain
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -52,12 +55,13 @@ jobs:
with:
command: build
args: -p spyglass

# Setup arch targets - linux
- name: Move sidecar into place
run: |
mkdir -p crates/tauri/binaries
cp target/debug/spyglass crates/tauri/binaries/spyglass-server-${{ env.target_arch }}
cp target/debug/spyglass-debug crates/tauri/binaries/spyglass-debug-${{ env.target_arch }}
cp target/debug/spyglass${{ env.target_ext }} crates/tauri/binaries/spyglass-server-${{ env.target_arch }}${{ env.target_ext }}
cp target/debug/spyglass-debug${{ env.target_ext }} crates/tauri/binaries/spyglass-debug-${{ env.target_arch }}${{ env.target_ext }}
cp utils/${{ env.target_os_name }}/pdftotext${{ env.target_ext }} crates/tauri/binaries/pdftotext-${{ env.target_arch }}${{ env.target_ext }}
# Build front-end client
- name: Build client
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/sentry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,19 @@ jobs:
run: |
echo "target_arch=$(rustc -Vv | grep host | awk '{print $2 " "}')" >> $GITHUB_ENV
echo "target_ext=" >> $GITHUB_ENV
echo "target_os_name=linux" >> $GITHUB_ENV
- name: setup arch target - macos
if: ${{startsWith(matrix.platform, 'macos')}}
run: |
echo "target_arch=x86_64-apple-darwin" >> $GITHUB_ENV
echo "target_ext=" >> $GITHUB_ENV
echo "target_os_name=mac" >> $GITHUB_ENV
- name: Setup arch target (windows only)
if: ${{startsWith(matrix.platform, 'windows')}}
run: |
echo "target_arch=x86_64-pc-windows-msvc" >> $env:GITHUB_ENV
echo "target_ext=.exe" >> $env:GITHUB_ENV
echo "target_os_name=win" >> $env:GITHUB_ENV
# search backend
- name: build search backend
run: |
Expand All @@ -84,6 +87,7 @@ jobs:
mkdir -p crates/tauri/binaries
cp target/sentry/spyglass${{ env.target_ext }} crates/tauri/binaries/spyglass-server-${{ env.target_arch }}${{ env.target_ext }}
cp target/sentry/spyglass-debug${{ env.target_ext }} crates/tauri/binaries/spyglass-debug-${{ env.target_arch }}${{ env.target_ext }}
cp utils/${{ env.target_os_name }}/pdftotext${{ env.target_ext }} crates/tauri/binaries/pdftotext-${{ env.target_arch }}${{ env.target_ext }}
- name: build frontend
run: cd crates/client && trunk build
- name: build tauri app
Expand Down
Loading

0 comments on commit a336ae9

Please sign in to comment.