Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ concurrency:

env:
CARGO_TERM_COLOR: always
# Pin the prebuilt liblbug release to the lbug crate version in Cargo.toml.
LBUG_VERSION: "0.20.4"
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"

Expand All @@ -42,6 +40,20 @@ jobs:
with:
components: clippy, rustfmt

- name: Resolve lbug version from Cargo.toml
shell: bash
run: |
# Single source of truth is the lbug dependency in Cargo.toml;
# do not hard-code the version here. grep (not sed), so this
# works identically on Linux/macOS/Windows runners (incl. git-bash).
VERSION=$(grep -E '^lbug *=.*version *=' Cargo.toml | head -n1 | grep -oE '"[^"]+"' | head -n1 | tr -d '"')
if [ -z "$VERSION" ]; then
echo "could not resolve lbug version from Cargo.toml" >&2
exit 1
fi
echo "LBUG_VERSION=$VERSION" >> "$GITHUB_ENV"
echo "Resolved lbug version: $VERSION"

- name: Run sccache
uses: mozilla/sccache-action@v0.0.9

Expand Down Expand Up @@ -90,6 +102,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Resolve lbug version from Cargo.toml
shell: bash
run: |
# Single source of truth is the lbug dependency in Cargo.toml;
# do not hard-code the version here. grep (not sed), so this
# works identically on Linux/macOS/Windows runners (incl. git-bash).
VERSION=$(grep -E '^lbug *=.*version *=' Cargo.toml | head -n1 | grep -oE '"[^"]+"' | head -n1 | tr -d '"')
if [ -z "$VERSION" ]; then
echo "could not resolve lbug version from Cargo.toml" >&2
exit 1
fi
echo "LBUG_VERSION=$VERSION" >> "$GITHUB_ENV"
echo "Resolved lbug version: $VERSION"

- name: Install dependencies (macOS)
if: matrix.platform == 'macos-latest'
run: brew install libomp openssl
Expand Down Expand Up @@ -159,10 +185,12 @@ jobs:
# signed; a downloaded copy needs "Open Anyway" once unless a
# Developer ID signature + notarization is added later.
version="${VERSION#v}"
# PR builds have ref_name like 1/merge; slashes break archive paths.
version="${version//\//-}"
rm -rf dist
mkdir -p dist/Bugscope.app/Contents/MacOS dist/Bugscope.app/Contents/Resources
cp "target/${{ matrix.target }}/release/${{ matrix.binary }}" dist/Bugscope.app/Contents/MacOS/bugscope
sed "s/@VERSION@/${version}/g" packaging/macos/Info.plist > dist/Bugscope.app/Contents/Info.plist
sed "s|@VERSION@|${version}|g" packaging/macos/Info.plist > dist/Bugscope.app/Contents/Info.plist
codesign --deep --force -s - dist/Bugscope.app
archive="dist/bugscope-${version}-${{ matrix.target }}-macos.zip"
ditto -c -k --keepParent dist/Bugscope.app "$archive"
Expand All @@ -175,6 +203,8 @@ jobs:
run: |
# Ship a tarball: tar preserves the exec bit, unlike a bare binary.
version="${VERSION#v}"
# PR builds have ref_name like 1/merge; slashes break archive paths.
version="${version//\//-}"
name="bugscope-${version}-${{ matrix.target }}-linux"
rm -rf dist && mkdir -p "dist/$name"
cp "target/${{ matrix.target }}/release/${{ matrix.binary }}" "dist/$name/"
Expand All @@ -191,6 +221,8 @@ jobs:
VERSION: ${{ github.ref_name }}
run: |
$version = $env:VERSION -replace '^v',''
# PR builds have ref_name like 1/merge; slashes break archive paths.
$version = $version -replace '/', '-'
$name = "bugscope-$version-${{ matrix.target }}-windows"
if (Test-Path dist) { Remove-Item -Recurse -Force dist }
New-Item -ItemType Directory -Force "dist/$name" | Out-Null
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

[dependencies]
gpui = "0.2"
lbug = { version = "0.20.4", features = ["arrow"] }
lbug = { version = "0.21.1", features = ["arrow"] }
arrow = { version = "55", default-features = false, features = ["ffi"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
Loading