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

chore: linux cli brew

Louis Beaumontf1917a70f77b
diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml
index 3f335564f..f8e207769 100644
--- a/.github/workflows/release-cli.yml
+++ b/.github/workflows/release-cli.yml
@@ -1,6 +1,8 @@
# # Run for macOS
# act -W .github/workflows/release-cli.yml --container-architecture linux/amd64 -j build-macos -P macos-latest=-self-hosted
+# act -W .github/workflows/release-cli.yml --container-architecture linux/amd64 -j build-linux -P ubuntu-latest=catthehacker/ubuntu:act-latest --secret GITHUB_TOKEN=$(cat .env | grep GITHUB_TOKEN | tail -n 1 | cut -d '=' -f 2)
+
name: Release CLI
on:
@@ -173,6 +175,100 @@ jobs:
name: screenpipe-windows
path: screenpipe-*.zip
+ build-linux:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Set up Rust
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ targets: ${{ matrix.target }}
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y \
+ pkg-config \
+ ffmpeg \
+ libavcodec-dev \
+ libavformat-dev \
+ libavutil-dev \
+ libswscale-dev \
+ libasound2-dev \
+ libdbus-1-dev \
+ libxcb1-dev \
+ libxcb-render0-dev \
+ libxcb-shape0-dev \
+ libxcb-xfixes0-dev \
+ libtesseract-dev \
+ libssl-dev \
+ cmake \
+ build-essential \
+ libx11-dev \
+ libxi-dev \
+ libxext-dev \
+ libxtst-dev \
+ libxrandr-dev \
+ libxinerama-dev \
+ libxcursor-dev \
+ libxdo-dev
+
+ - name: Install LLVM and Clang
+ uses: KyleMayes/install-llvm-action@v1
+ with:
+ version: "14.0"
+
+ - name: Set LIBCLANG_PATH
+ run: |
+ echo "LIBCLANG_PATH=$(llvm-config --prefix)/lib" >> $GITHUB_ENV
+
+ - uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/git/db/
+ key: ${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+
+ - name: Build CLI
+ run: |
+ cargo build --release --features pipes --target ${{ matrix.target }}
+
+ - name: Set version
+ run: |
+ if [[ $GITHUB_REF == refs/tags/* ]]; then
+ VERSION=${GITHUB_REF#refs/tags/v}
+ else
+ VERSION=$(git ls-remote --tags --refs --sort="version:refname" | tail -n1 | sed 's/.*\///' | sed 's/^v//')
+ fi
+ if [[ -z "$VERSION" ]]; then
+ VERSION="0.0.0"
+ fi
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
+ echo "Set version to: $VERSION"
+
+ - name: Create deployment package
+ run: |
+ mkdir -p screenpipe-${{ env.VERSION }}-${{ matrix.target }}/bin
+ cp target/${{ matrix.target }}/release/screenpipe screenpipe-${{ env.VERSION }}-${{ matrix.target }}/bin/
+ tar -czf screenpipe-${{ env.VERSION }}-${{ matrix.target }}.tar.gz -C screenpipe-${{ env.VERSION }}-${{ matrix.target }} .
+
+ - name: Calculate SHA256
+ run: |
+ echo "LINUX_SHA256_${{ matrix.target }}=$(sha256sum screenpipe-*.tar.gz | cut -d ' ' -f 1)" >> $GITHUB_ENV
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: screenpipe-linux-${{ matrix.target }}
+ path: screenpipe-*.tar.gz
+
update-homebrew:
needs: build-macos
runs-on: macos-latest
@@ -202,7 +298,7 @@ jobs:
release:
runs-on: ubuntu-latest
- needs: [build-macos, build-windows, update-homebrew]
+ needs: [build-macos, build-windows, build-linux, update-homebrew]
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -247,3 +343,10 @@ jobs:
echo "Warning: $file not found"
fi
done
+ for file in artifacts/screenpipe-linux-*/screenpipe-*.tar.gz; do
+ if [ -f "$file" ]; then
+ gh release upload v${{ env.VERSION }} "$file" --clobber
+ else
+ echo "Warning: $file not found"
+ fi
+ done