chore: add linux static build (#379)

* chore: add linux static build

* add touch

* update build env

* add sudo

* fix: protobuf ubuntu target
release-0.0
Meng Zhang 2023-08-30 18:45:05 +08:00 committed by GitHub
parent 3526ca3164
commit 054aefaf15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions

View File

@ -42,10 +42,12 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [macos-11] os: [macos-11, ubuntu-latest]
include: include:
- os: macos-11 - os: macos-11
target: aarch64-apple-darwin target: aarch64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
env: env:
SCCACHE_GHA_ENABLED: true SCCACHE_GHA_ENABLED: true
@ -101,16 +103,17 @@ jobs:
permissions: permissions:
contents: write contents: write
steps: steps:
- name: Download a single artifact - name: Download all artifacts
uses: actions/download-artifact@v3 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 - uses: ncipollo/release-action@v1
with: with:
allowUpdates: true allowUpdates: true
prerelease: true prerelease: true
name: "Development Build" name: "Development Build"
artifacts: tabby_aarch64-apple-darwin artifacts: "tabby_*/tabby_*"
tag: latest tag: latest
removeArtifacts: true removeArtifacts: true

View File

@ -3,3 +3,7 @@
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
brew install protobuf brew install protobuf
fi fi
if [[ "$OSTYPE" == "linux"* ]]; then
sudo apt-get -y install protobuf-compiler
fi

View File

@ -3,6 +3,7 @@ use std::error::Error;
use vergen::EmitBuilder; use vergen::EmitBuilder;
fn main() -> Result<(), Box<dyn Error>> { fn main() -> Result<(), Box<dyn Error>> {
// touch
EmitBuilder::builder().all_build().all_git().emit()?; EmitBuilder::builder().all_build().all_git().emit()?;
Ok(()) Ok(())
} }