Skip to content

Commit 0d4d092

Browse files
committedFeb 1, 2025·
ci: ensure the release can build arm64 binaries
1 parent f4e59ef commit 0d4d092

File tree

5 files changed

+32
-44
lines changed

5 files changed

+32
-44
lines changed
 

‎.github/workflows/release.yml

+2-23
Original file line numberDiff line numberDiff line change
@@ -53,31 +53,10 @@ jobs:
5353
- uses: actions/checkout@v3
5454
- name: Install Rust toolchain
5555
uses: dtolnay/rust-toolchain@stable
56-
- name: Install Zig toolchain
57-
uses: korandoru/setup-zig@v1
58-
with:
59-
zig-version: 0.10.0
60-
- name: Install Cargo Lambda
61-
uses: jaxxstorm/action-install-gh-release@v1.9.0
62-
with:
63-
repo: cargo-lambda/cargo-lambda
64-
platform: linux # Other valid options: 'windows' or 'darwin'
65-
arch: x86_64 # Other valid options for linux: 'aarch64'
6656
- name: Build release
6757
run: ./ci/build-release.sh
6858

69-
- name: release
70-
uses: actions/create-release@v1
71-
id: create_release
72-
with:
73-
draft: false
74-
prerelease: false
75-
release_name: ${{ steps.version.outputs.version }}
76-
tag_name: ${{ github.ref }}
77-
env:
78-
GITHUB_TOKEN: ${{ github.token }}
79-
80-
- name: Upload assets
59+
- name: Create Release
8160
uses: softprops/action-gh-release@v2
8261
with:
83-
files: ./target/lambda/**/*.zip
62+
files: ./target/lambda/*.zip

‎Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ members = [
77
resolver = "2"
88

99
[workspace.package]
10-
version = "1.2.6"
10+
version = "1.3.0"
1111
edition = "2021"
1212
keywords = ["deltalake", "parquet", "lambda", "delta", "sqs"]
1313
homepage = "https://github.com/buoyant-data/oxbow"

‎Cross.toml

-11
This file was deleted.

‎ci/build-release.sh

+29-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,36 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
2+
3+
set -eau pipefail
24

35
if [ -f "${HOME}/.cargo/env" ]; then
46
. "${HOME}/.cargo/env"
57
fi;
68

9+
if [ ! -d venv ]; then
10+
python3 -m venv venv
11+
. venv/bin/activate
12+
pip3 install cargo-lambda ziglang
13+
fi;
14+
715
. venv/bin/activate
816

9-
exec cargo lambda build --release --output-format zip
17+
PLATFORMS=("x86-64" "arm64")
18+
19+
for d in $(ls ./lambdas); do
20+
if [ ! -d "./lambdas/${d}" ]; then
21+
echo ">> ${d} is not a directory? por que?";
22+
exit 1
23+
fi;
24+
echo ">> Building release for ${d}"
25+
26+
# The package name for the oxbow lambda is not just "oxbow" because it would collide with the crate named "oxbow"
27+
if [ "${d}" = "oxbow" ]; then
28+
d="oxbow-lambda";
29+
fi
30+
31+
for p in ${PLATFORMS[@]}; do
32+
echo ">> ${p}"
33+
time cargo lambda build --package ${d} --release --output-format zip --${p} --lambda-dir target/lambda/${p}
34+
mv target/lambda/${p}/${d}/bootstrap.zip target/lambda/${d}-${p}.zip
35+
done;
36+
done;

‎lambdas/sqs-ingest/src/main.rs

-7
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ async fn main() -> Result<(), Error> {
5555

5656
let _ =
5757
env::var("DELTA_TABLE_URI").expect("The `DELTA_TABLE_URI` must be set in the environment");
58-
match env::var("DYNAMO_LOCK_TABLE_NAME") {
59-
Ok(_) => {}
60-
Err(_) => {
61-
warn!("sqs-ingest SHOULD have `DYNAMO_LOCK_TABLE_NAME` set to a valid name, and should have AWS_S3_LOCKING_PROVIDER=dynamodb set so that concurrent writes can be performed safely.");
62-
}
63-
}
64-
6558
info!("Starting sqs-ingest");
6659

6760
run(service_fn(function_handler)).await

0 commit comments

Comments
 (0)
Please sign in to comment.