Skip to content

Commit 8b79c28

Browse files
authored
Merge pull request #58 from SwissDataScienceCenter/release-profile
remove CI strip in favor of Rust profile setting
2 parents f28096e + 09407f4 commit 8b79c28

2 files changed

Lines changed: 47 additions & 53 deletions

File tree

.github/workflows/publish.yml

Lines changed: 41 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish
22
on:
33
push:
44
tags:
5-
- 'v*'
5+
- "v*"
66
branches:
77
- main
88

@@ -17,31 +17,31 @@ jobs:
1717
fail-fast: true
1818
matrix:
1919
build:
20-
- aarch64
21-
- aarch64-musl
22-
- amd64-musl
23-
- amd64
20+
- aarch64
21+
- aarch64-musl
22+
- amd64-musl
23+
- amd64
2424
include:
25-
- build: aarch64
26-
os: ubuntu-latest
27-
target: aarch64-unknown-linux-gnu
28-
use-cross: true
29-
features: "--no-default-features --features rustls"
30-
- build: aarch64-musl
31-
os: ubuntu-latest
32-
target: aarch64-unknown-linux-musl
33-
use-cross: true
34-
features: "--no-default-features --features rustls"
35-
- build: amd64
36-
os: ubuntu-latest
37-
target: x86_64-unknown-linux-gnu
38-
use-cross: false
39-
features: ""
40-
- build: amd64-musl
41-
os: ubuntu-latest
42-
target: x86_64-unknown-linux-musl
43-
use-cross: true
44-
features: "--no-default-features --features rustls"
25+
- build: aarch64
26+
os: ubuntu-latest
27+
target: aarch64-unknown-linux-gnu
28+
use-cross: true
29+
features: "--no-default-features --features rustls"
30+
- build: aarch64-musl
31+
os: ubuntu-latest
32+
target: aarch64-unknown-linux-musl
33+
use-cross: true
34+
features: "--no-default-features --features rustls"
35+
- build: amd64
36+
os: ubuntu-latest
37+
target: x86_64-unknown-linux-gnu
38+
use-cross: false
39+
features: ""
40+
- build: amd64-musl
41+
os: ubuntu-latest
42+
target: x86_64-unknown-linux-musl
43+
use-cross: true
44+
features: "--no-default-features --features rustls"
4545
steps:
4646
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
4747
with:
@@ -96,30 +96,18 @@ jobs:
9696
command: build
9797
args: ${{ matrix.features }} --release --target=${{ matrix.target }}
9898

99-
- name: Strip debug information from executable
100-
id: strip
99+
- name: set bin path
100+
id: bin-path
101101
shell: bash
102102
run: |
103-
# Figure out what strip tool to use if any
104-
STRIP="strip"
105-
case ${{ matrix.target }} in
106-
arm-unknown-linux-gnueabihf) STRIP="arm-linux-gnueabihf-strip" ;;
107-
aarch64-unknown-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;;
108-
aarch64-unknown-linux-musl) STRIP="aarch64-linux-gnu-strip" ;;
109-
*-pc-windows-msvc) STRIP="" ;;
110-
esac;
111103
# Setup paths
112-
BIN_DIR="_cicd/stripped-release-bin/"
104+
BIN_DIR="_cicd/release-bin/"
113105
mkdir -p "${BIN_DIR}"
114106
BIN_NAME="${{ env.PROJECT_NAME }}"
115107
BIN_PATH="${BIN_DIR}/${BIN_NAME}_${{ matrix.build }}-${{ env.VERSION_SUFFIX }}"
116108
# Copy the release build binary to the result location
117109
cp "target/${{ matrix.target }}/release/${BIN_NAME}" "${BIN_PATH}"
118-
# Also strip if possible
119-
if [ -n "${STRIP}" ]; then
120-
"${STRIP}" "${BIN_PATH}"
121-
fi
122-
# Let subsequent steps know where to find the (stripped) bin
110+
# Let subsequent steps know where to find the bin
123111
echo "BIN_PATH=${BIN_PATH}" >> $GITHUB_OUTPUT
124112
125113
- name: Publish Release
@@ -130,7 +118,7 @@ jobs:
130118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131119
with:
132120
files: |
133-
${{ steps.strip.outputs.BIN_PATH }}
121+
${{ steps.bin-path.outputs.BIN_PATH }}
134122
135123
- name: Publish Pre-Release
136124
id: publish-pre
@@ -146,7 +134,7 @@ jobs:
146134
commit: "main"
147135
name: "renku-cli nightly"
148136
replacesArtifacts: true
149-
artifacts: ${{ steps.strip.outputs.BIN_PATH }}
137+
artifacts: ${{ steps.bin-path.outputs.BIN_PATH }}
150138

151139
publish-mac:
152140
runs-on: macos-latest
@@ -155,17 +143,17 @@ jobs:
155143
fail-fast: true
156144
matrix:
157145
build:
158-
- aarch64
159-
- amd64
146+
- aarch64
147+
- amd64
160148
include:
161-
- build: amd64
162-
target: x86_64-apple-darwin
163-
use-cross: true
164-
features: ""
165-
- build: aarch64
166-
target: aarch64-apple-darwin
167-
use-cross: false
168-
features: ""
149+
- build: amd64
150+
target: x86_64-apple-darwin
151+
use-cross: true
152+
features: ""
153+
- build: aarch64
154+
target: aarch64-apple-darwin
155+
use-cross: false
156+
features: ""
169157
steps:
170158
- name: Checkout
171159
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,9 @@ predicates = "3.1.2"
4949

5050
[build-dependencies]
5151
vergen = { version = "8.3.2", features = ["build", "git", "gitcl", "rustc", "cargo"] }
52+
53+
[profile.release]
54+
strip ="debuginfo"
55+
opt-level = "z"
56+
lto = true
57+

0 commit comments

Comments
 (0)