Skip to content

Commit

Permalink
Merge pull request #629 from Neptune650/self_hosted
Browse files Browse the repository at this point in the history
Update even more actions
  • Loading branch information
louis030195 authored Nov 5, 2024
2 parents 21ac915 + 36b9b1d commit 0c675ba
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 79 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Run Apple OCR benchmark
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Install dependencies
Expand All @@ -24,7 +24,7 @@ jobs:
cargo bench --bench ocr_benchmark -- --output-format bencher | tee -a ocr_output.txt
- name: Upload OCR benchmark artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ocr-benchmark-data
path: ocr_output.txt
Expand All @@ -33,7 +33,7 @@ jobs:
name: Run Tesseract OCR benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Install dependencies
Expand All @@ -46,7 +46,7 @@ jobs:
cargo bench --bench ocr_benchmark -- --output-format bencher | tee -a ocr_output.txt
- name: Upload OCR benchmark artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ocr-benchmark-data
path: ocr_output.txt
Expand All @@ -55,7 +55,7 @@ jobs:
name: Run Windows OCR benchmark
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Run Windows OCR benchmarks
Expand All @@ -65,7 +65,7 @@ jobs:
# | Tee-Object -Append -FilePath ocr_output.txt
- name: Upload OCR benchmark artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ocr-benchmark-data
path: ocr_output.txt
Expand All @@ -74,7 +74,7 @@ jobs:
name: Run STT benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Install dependencies
Expand All @@ -87,7 +87,7 @@ jobs:
cargo bench --bench stt_benchmark -- --output-format bencher | tee -a stt_output.txt
- name: Upload STT benchmark artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: stt-benchmark-data
path: stt_output.txt
Expand All @@ -102,7 +102,7 @@ jobs:
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download benchmark data
uses: actions/download-artifact@v3
Expand Down
56 changes: 35 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
env:
RUSTFLAGS: "-C link-arg=-Wl,--allow-multiple-definition"
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -25,13 +25,14 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/toolchain@v1
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
cache: true

- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: .github/scripts/install_dependencies.sh
Expand All @@ -56,25 +57,38 @@ jobs:
test-windows:
runs-on: [self-hosted, windows, x64]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~\AppData\Local\cargo\
target\
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/toolchain@v1
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: stable

- uses: oven-sh/setup-bun@v1
override: true
cache: true

- name: setup Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2

- name: Install vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: "2a3138723698306f4261632c92dc782f586167e3"

- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1

- name: Run pre_build.js on
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "10.0"

- name: Run pre_build.js
shell: bash
run: bun ./scripts/pre_build.js
working-directory: ./screenpipe-app-tauri
Expand All @@ -100,25 +114,25 @@ jobs:
test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~\AppData\Local\cargo\
target\
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/toolchain@v1
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: stable

- uses: oven-sh/setup-bun@v1
override: true
cache: true

- name: setup Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2

- name: Run pre_build.js on
- name: Run pre_build.js
shell: bash
env:
SKIP_SCREENPIPE_SETUP: true # avoid trying to copy screenpipe binaries, not yet built (next step)
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/linux-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

cache: true

- name: Install dependencies
run: .github/scripts/install_dependencies.sh

Expand Down Expand Up @@ -50,23 +50,20 @@ jobs:
run: .github/scripts/check_logs.sh

- name: Upload logs
uses: actions/upload-artifact@v3
if: always()
uses: actions/upload-artifact@v4
with:
name: screenpipe-logs
path: screenpipe_output.log

- name: Upload captured data
uses: actions/upload-artifact@v3
if: always()
uses: actions/upload-artifact@v4
with:
name: screenpipe-data
path: |
~/.screenpipe/data/
- name: Upload test image
uses: actions/upload-artifact@v3
if: always()
uses: actions/upload-artifact@v4
with:
name: test-image
path: test_image.png
16 changes: 9 additions & 7 deletions .github/workflows/perf-long-running-end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -21,10 +21,12 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/toolchain@v1
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
cache: true

- name: Install dependencies
run: |
Expand Down Expand Up @@ -79,13 +81,13 @@ jobs:
EOF
- name: Upload memory usage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: memory-usage-data
path: memory_usage.csv

- name: Upload memory usage graph
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: memory-usage-graph
path: memory_usage_graph.png
Expand All @@ -102,7 +104,7 @@ jobs:
sqlite3 ~/.screenpipe/db.sqlite "SELECT COUNT(*) FROM audio_transcriptions;"
- name: Upload screenpipe data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: screenpipe-data
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
--prerelease=false
- name: Publish Release
uses: crabnebula-dev/[email protected].0
uses: crabnebula-dev/[email protected]
with:
command: release publish ${{ secrets.CN_APP_SLUG }} --framework tauri
api-key: ${{ secrets.CN_API_KEY }}
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/release-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,22 @@ jobs:
if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'big-linux'
run: sudo apt-get install -y wget

- name: Install vcpkg
if: matrix.args == '--target x86_64-pc-windows-msvc' || matrix.platform == 'big-windows'
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: "2a3138723698306f4261632c92dc782f586167e3"

- name: Set up MSVC
if: matrix.args == '--target x86_64-pc-windows-msvc' || matrix.platform == 'big-windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Install LLVM and Clang
if: matrix.args == '--target x86_64-pc-windows-msvc' || matrix.platform == 'big-windows'
uses: KyleMayes/install-llvm-action@v2
with:
version: "10.0"

- name: Run pre_build.js
shell: bash
env:
Expand Down Expand Up @@ -199,22 +215,6 @@ jobs:
bun ./scripts/pre_build.js ${{ matrix.pre-build-args }}
working-directory: ./screenpipe-app-tauri

- name: Install vcpkg
if: matrix.args == '--target x86_64-pc-windows-msvc' || matrix.platform == 'big-windows'
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: "7adc2e4d49e8d0efc07a369079faa6bc3dbb90f3"

- name: Set up MSVC
if: matrix.args == '--target x86_64-pc-windows-msvc' || matrix.platform == 'big-windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Install LLVM and Clang
if: matrix.args == '--target x86_64-pc-windows-msvc' || matrix.platform == 'big-windows'
uses: KyleMayes/install-llvm-action@v2
with:
version: "10.0"

- name: Free Disk Space (Ubuntu)
if: matrix.platform == 'ubuntu-22.04'
uses: jlumbroso/free-disk-space@main
Expand Down
Loading

0 comments on commit 0c675ba

Please sign in to comment.