From 054aefaf15690cda7cfdf9f1eed88e2fc725e70c Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Wed, 30 Aug 2023 18:45:05 +0800 Subject: [PATCH] chore: add linux static build (#379) * chore: add linux static build * add touch * update build env * add sudo * fix: protobuf ubuntu target --- .github/workflows/ci.yml | 13 ++++++++----- ci/prepare_build_environment.sh | 4 ++++ crates/tabby/build.rs | 1 + 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a321f5..cc9f926 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,10 +42,12 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-11] + os: [macos-11, ubuntu-latest] include: - os: macos-11 target: aarch64-apple-darwin + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu env: SCCACHE_GHA_ENABLED: true @@ -101,16 +103,17 @@ jobs: permissions: contents: write steps: - - name: Download a single artifact + - name: Download all artifacts uses: actions/download-artifact@v3 - with: - name: tabby_aarch64-apple-darwin + + - name: Display structure of downloaded files + run: ls -R - uses: ncipollo/release-action@v1 with: allowUpdates: true prerelease: true name: "Development Build" - artifacts: tabby_aarch64-apple-darwin + artifacts: "tabby_*/tabby_*" tag: latest removeArtifacts: true diff --git a/ci/prepare_build_environment.sh b/ci/prepare_build_environment.sh index e1b3c09..2726d58 100755 --- a/ci/prepare_build_environment.sh +++ b/ci/prepare_build_environment.sh @@ -3,3 +3,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then brew install protobuf fi + +if [[ "$OSTYPE" == "linux"* ]]; then + sudo apt-get -y install protobuf-compiler +fi diff --git a/crates/tabby/build.rs b/crates/tabby/build.rs index 0bf2030..37ed5bc 100644 --- a/crates/tabby/build.rs +++ b/crates/tabby/build.rs @@ -3,6 +3,7 @@ use std::error::Error; use vergen::EmitBuilder; fn main() -> Result<(), Box> { + // touch EmitBuilder::builder().all_build().all_git().emit()?; Ok(()) }