Skip to content

Commit 0af371d

Browse files
authored
fix build versioning (#19)
* clean up from static builds * fix build versioning * include git history * debugging git * debugging git * debugging git * debugging git * debugging git * debugging git * debugging git
1 parent 6af1947 commit 0af371d

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

.github/workflows/release.yaml

+11-6
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,29 @@ jobs:
6565
runner: warp-ubuntu-latest-x64-16x
6666

6767
steps:
68-
- uses: actions/checkout@v4
69-
7068
- uses: WarpBuilds/rust-cache@v2
7169

72-
- name: Prepare filename
73-
run: echo "OUTPUT_FILENAME=rbuilder-${VERSION}-${{ matrix.configs.target }}" >> $GITHUB_ENV
74-
75-
- name: Build binary
70+
- name: Install dependencies
7671
run: |
7772
apt-get update
7873
apt-get install -y \
7974
build-essential \
8075
curl \
76+
git \
8177
libclang-dev \
8278
libssl-dev \
8379
pkg-config \
8480
protobuf-compiler
8581
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
82+
83+
- uses: actions/checkout@v4 # must install git before checkout and set safe.directory after checkout because of container
84+
85+
- name: Prepare filename
86+
run: echo "OUTPUT_FILENAME=rbuilder-${VERSION}-${{ matrix.configs.target }}" >> $GITHUB_ENV
87+
88+
- name: Build binary
89+
run: |
90+
git config --global --add safe.directory "$(pwd)"
8691
. $HOME/.cargo/env
8792
cargo build --release --target ${{ matrix.configs.target }}
8893

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
openssl = { version = "0.10", features = ["vendored"], optional = false }
87
clap = { version = "4.4.3", features = ["derive", "env"] }
98
tokio = "1.32.0"
109
tokio-util = "0.7.10"

Cross.toml

-7
This file was deleted.

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ clean: ## Clean up
2323

2424
.PHONY: build
2525
build: ## Build static binary for x86_64
26-
cross build --release --target x86_64-unknown-linux-musl
26+
cargo build --release --target x86_64-unknown-linux-gnu
2727

2828
.PHONY: docker-image
2929
docker-image: ## Build a rbuilder Docker image

0 commit comments

Comments
 (0)