Skip to content

Commit

Permalink
adds support for windows x86 release (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahadarsh authored Jan 9, 2024
1 parent 5a2196a commit 5a4e177
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/tembo_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,25 @@ jobs:
- target: x86_64-apple-darwin
asset_name: x86_64-apple
os: macos-latest
executable: tembo
- target: aarch64-apple-darwin
asset_name: aarch64-apple
os: macos-latest
executable: tembo
- target: x86_64-unknown-linux-musl
asset_name: x86_64-linux
os: ubuntu-20.04
container: quay.io/tembo/muslrust:1.71.0-stable
executable: tembo
- target: aarch64-unknown-linux-musl
asset_name: aarch64-linux
os: ubuntu-20.04
container: messense/rust-musl-cross:aarch64-musl
executable: tembo
- target: x86_64-pc-windows-msvc
asset_name: x86_64-windows
os: windows-latest
executable: tembo.exe
runs-on: ${{ matrix.os }}
container:
image: ${{ matrix.container }}
Expand All @@ -49,27 +57,25 @@ jobs:
working-directory: ./tembo-cli
id: cargo_build
run: |
set -x
rustup target add ${{ matrix.target }}
cargo build --release --target=${{ matrix.target }}
cd target/${{ matrix.target }}/release
tar -czvf tembo.tar.gz tembo
tar -czvf tembo.tar.gz ${{ matrix.executable }}
git config --global --add safe.directory '*'
# TODO: Figure out a better way to fetch version for mac & linux
- name: CLI version Mac
working-directory: ./tembo-cli
id: cli_version_mac
run: |
set -x
cargo install cargo-get
TEMBO_CLI_NAME=$(cargo-get package.name)-$(cargo-get package.version)
echo "TEMBO_CLI_NAME=$TEMBO_CLI_NAME" >> $GITHUB_ENV
if: runner.os == 'macOS'

- name: CLI version Ubuntu
- name: CLI version Linux
working-directory: ./tembo-cli
id: cli_version_ubuntu
id: cli_version_linux
run: |
set -x
PKG_VERSION=$(awk -F ' = ' '$$1 ~ /version/ { gsub(/[\\"]/, "", $$2); printf("%s",$$2); exit; }' Cargo.toml)
Expand All @@ -78,6 +84,16 @@ jobs:
echo "TEMBO_CLI_NAME=$TEMBO_CLI_NAME" >> $GITHUB_ENV
if: runner.os == 'Linux'

- name: CLI version Windows
working-directory: ./tembo-cli
id: cli_version_windows
run: |
$TEMBO_VERSION = $(target/${{ matrix.target }}/release/tembo.exe --version)
$TEMBO_CLI_NAME = $TEMBO_VERSION.replace(' ','-')
echo "TEMBO_CLI_NAME=$TEMBO_CLI_NAME" >> $env:GITHUB_ENV
if: runner.os == 'Windows'

- name: "Generate release changelog"
id: changelog
uses: mikepenz/[email protected]
Expand Down
3 changes: 3 additions & 0 deletions tembo-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ openssl = { version = "0.10", features = ["vendored"] }
[target.x86_64-apple-darwin.dependencies]
openssl = { version = "0.10", features = ["vendored"] }

[target.x86_64-pc-windows-msvc.dependencies]
openssl = { version = "0.10", features = ["vendored"] }

[dev-dependencies]
assert_cmd = "2.0.8"
predicates = "2.1.5"
Expand Down

0 comments on commit 5a4e177

Please sign in to comment.