Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: ci

Louis Beaumontf0b8632751bf
diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml
index 07ba9d468..68010c960 100644
--- a/.github/workflows/release-cli.yml
+++ b/.github/workflows/release-cli.yml
@@ -9,6 +9,9 @@ on:
jobs:
build-macos:
runs-on: macos-latest
+ strategy:
+ matrix:
+ target: [x86_64-apple-darwin, aarch64-apple-darwin]
steps:
- name: Checkout code
uses: actions/checkout@v2
@@ -19,6 +22,7 @@ jobs:
toolchain: stable
profile: minimal
override: true
+ target: ${{ matrix.target }}
- name: Install dependencies
run: |
@@ -26,23 +30,27 @@ jobs:
- name: Build with Metal feature
run: |
- cargo build --release --features metal
+ cargo build --release --features metal --target ${{ matrix.target }}
- name: Create deployment package
run: |
VERSION=${GITHUB_REF#refs/tags/v}
- tar -czf screenpipe-${VERSION}-x86_64-apple-darwin.tar.gz -C target/release screenpipe
+ tar -czf screenpipe-${VERSION}-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release screenpipe
- name: Calculate SHA256
run: |
- echo "MAC_SHA256=$(shasum -a 256 screenpipe-*.tar.gz | cut -d ' ' -f 1)" >> $GITHUB_ENV
+ echo "MAC_SHA256_${{ matrix.target }}=$(shasum -a 256 screenpipe-*.tar.gz | cut -d ' ' -f 1)" >> $GITHUB_ENV
- name: Update Homebrew Formula
run: |
VERSION=${GITHUB_REF#refs/tags/v}
- sed -i '' "s/version \".*\"/version \"$VERSION\"/" Formula/screenpipe.rb
- sed -i '' "s/sha256 \".*\"/sha256 \"${{ env.MAC_SHA256 }}\"/" Formula/screenpipe.rb
- sed -i '' "s/v[0-9.]*\/screenpipe-[0-9.]*-x86_64-apple-darwin/v$VERSION\/screenpipe-$VERSION-x86_64-apple-darwin/" Formula/screenpipe.rb
+ sed 's/version ".*"/version "'$VERSION'"/' Formula/screenpipe.rb > Formula/screenpipe.tmp && mv Formula/screenpipe.tmp Formula/screenpipe.rb
+ if [ "${{ matrix.target }}" = "x86_64-apple-darwin" ]; then
+ sed 's/sha256 ".*" # x86_64/sha256 "'${{ env.MAC_SHA256_x86_64-apple-darwin }}'" # x86_64/' Formula/screenpipe.rb > Formula/screenpipe.tmp && mv Formula/screenpipe.tmp Formula/screenpipe.rb
+ else
+ sed 's/sha256 ".*" # arm64/sha256 "'${{ env.MAC_SHA256_aarch64-apple-darwin }}'" # arm64/' Formula/screenpipe.rb > Formula/screenpipe.tmp && mv Formula/screenpipe.tmp Formula/screenpipe.rb
+ fi
+ sed 's|v[0-9.]*\/screenpipe-[0-9.]*-${{ matrix.target }}|v'$VERSION'\/screenpipe-'$VERSION'-${{ matrix.target }}|' Formula/screenpipe.rb > Formula/screenpipe.tmp && mv Formula/screenpipe.tmp Formula/screenpipe.rb
- name: Commit and push Homebrew Formula changes
env:
@@ -51,13 +59,13 @@ jobs:
git config user.name github-actions
git config user.email [email protected]
git add Formula/screenpipe.rb
- git commit -m "chore: update brew to version ${GITHUB_REF#refs/tags/v}"
+ git commit -m "chore: update brew to version ${GITHUB_REF#refs/tags/v} for ${{ matrix.target }}"
git push
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
- name: screenpipe-macos
+ name: screenpipe-macos-${{ matrix.target }}
path: screenpipe-*.tar.gz
build-ubuntu:
@@ -69,7 +77,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
- sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev ffmpeg libasound2-dev libgdk3-dev
+ sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev ffmpeg libasound2-dev
- name: Set up Rust
uses: actions-rs/toolchain@v1
@@ -126,9 +134,18 @@ jobs:
run: |
choco install ffmpeg
+ - name: Install pkg-config
+ run: |
+ choco install pkgconfiglite
+
+ - name: Set up pkg-config
+ run: |
+ echo "PKG_CONFIG_PATH=C:\ProgramData\chocolatey\lib\pkgconfiglite\tools\pkg-config\lib\pkgconfig" >> $GITHUB_ENV
+ echo "C:\ProgramData\chocolatey\lib\pkgconfiglite\tools" >> $GITHUB_PATH
+
- name: Build release
run: |
- cargo build --release
+ cargo build --release --verbose
- name: Download FFmpeg
run: |
diff --git a/Formula/screenpipe.rb b/Formula/screenpipe.rb
index e9bc9fcfd..9f4e32ff1 100644
--- a/Formula/screenpipe.rb
+++ b/Formula/screenpipe.rb
@@ -1,9 +1,18 @@
class Screenpipe < Formula
- desc "Chat with an AI that knows everything about you."
+ desc "Library to build personalized AI powered by what you've seen, said, or heard."
homepage "https://github.com/louis030195/screen-pipe"
- url "https://github.com/louis030195/screen-pipe/releases/download/v0.1.38/screenpipe-0.1.38-x86_64-apple-darwin.tar.gz"
- sha256 "15f5dc0e296e774e55e029ad7944c93064658890c933b4db42434575a975c733"
+ url "https://github.com/louis030195/screen-pipe/releases/download/v0.1.38/screenpipe-0.1.38-aarch64-apple-darwin.tar.gz"
version "0.1.38"
+
+ on_macos do
+ if Hardware::CPU.arm?
+ url "https://github.com/louis030195/screen-pipe/releases/download/v#{version}/screenpipe-#{version}-aarch64-apple-darwin.tar.gz"
+ sha256 "15f5dc0e296e774e55e029ad7944c93064658890c933b4db42434575a975c733" # arm64
+ else
+ url "https://github.com/louis030195/screen-pipe/releases/download/v#{version}/screenpipe-#{version}-x86_64-apple-darwin.tar.gz"
+ sha256 "todo" # x86_64
+ end
+ end
depends_on "ffmpeg"
@@ -23,11 +32,11 @@ class Screenpipe < Formula
# wait linux release
# then
-# cargo build --release --features metal
-# tar -czf screenpipe-${VERSION}-x86_64-apple-darwin.tar.gz -C target/release screenpipe
-# shasum -a 256 screenpipe-${VERSION}-x86_64-apple-darwin.tar.gz
-# gh release upload v${VERSION} screenpipe-${VERSION}-x86_64-apple-darwin.tar.gz
-# rm screenpipe-${VERSION}-x86_64-apple-darwin.tar.gz
+# cargo build --release --features metal --target aarch64-apple-darwin
+# tar -czf screenpipe-${VERSION}-aarch64-apple-darwin.tar.gz -C target/release screenpipe
+# shasum -a 256 screenpipe-${VERSION}-aarch64-apple-darwin.tar.gz
+# gh release upload v${VERSION} screenpipe-${VERSION}-aarch64-apple-darwin.tar.gz
+# rm screenpipe-${VERSION}-aarch64-apple-darwin.tar.gz
# update the ruby code above (version and sha256)
# git add Formula/screenpipe.rb
# git commit -m "chore: update brew to version ${VERSION}"
diff --git a/examples/apps/screenpipe-app-tauri/scripts/pre_build.js b/examples/apps/screenpipe-app-tauri/scripts/pre_build.js
index e52f67bf6..070a5fa07 100644
--- a/examples/apps/screenpipe-app-tauri/scripts/pre_build.js
+++ b/examples/apps/screenpipe-app-tauri/scripts/pre_build.js
@@ -128,12 +128,6 @@ if (platform == 'windows') {
if (platform == 'macos') {
// Install lame using Homebrew
await $`brew install lame`
- // Copy lame to ffmpeg ! NEED SUDO
- if (await fs.exists(`${config.ffmpegRealname}/lib/`)) {
- await $`sudo cp -r /opt/homebrew/opt/lame/lib/* ${config.ffmpegRealname}/lib/`
- } else { // ci
- await $`sudo cp -r /opt/homebrew/opt/lame/lib/* ./src-tauri/${config.ffmpegRealname}/lib/`
- }
// Setup FFMPEG
if (!(await fs.exists(config.ffmpegRealname))) {
@@ -147,6 +141,9 @@ if (platform == 'macos') {
console.error("libmp3lame.0.dylib is missing from the FFmpeg package. Please use a FFmpeg build that includes MP3 support.");
}
}
+
+ // Copy lame to ffmpeg ! NEED SUDO
+ await $`sudo cp -r /opt/homebrew/opt/lame/lib/* ${config.ffmpegRealname}/lib/`
}
// Nvidia