-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cubestore): Upgrade rust to 1.77.0-nightly (635124704 2024-01-27) (
#7640) Upgrading - Rust - IPC channel - Mio - Clang-sys/libloading/cc rustc 1.77.0-nightly (635124704 2024-01-27) binary: rustc commit-hash: 635124704849eeead4e3a7bb6e663c5351571d93 commit-date: 2024-01-27 host: aarch64-apple-darwin release: 1.77.0-nightly LLVM version: 17.0.6
- Loading branch information
Showing
26 changed files
with
386 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
rust: [nightly-2022-06-22] | ||
rust: [nightly-2024-01-29] | ||
env: | ||
RUST: ${{ matrix.rust }} | ||
steps: | ||
|
@@ -185,59 +185,129 @@ jobs: | |
repository: cubejs/cubestore | ||
readme-filepath: ./rust/cubestore/README.md | ||
|
||
cross: | ||
cubestore: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 90 | ||
env: | ||
RUSTFLAGS: '-Ctarget-feature=+crt-static' | ||
OPENSSL_STATIC: 1 | ||
strategy: | ||
matrix: | ||
target: | ||
- x86_64-pc-windows-msvc | ||
- x86_64-apple-darwin | ||
include: | ||
- os: windows-2019 | ||
target: x86_64-pc-windows-msvc | ||
executable_name: cubestored.exe | ||
strip: true | ||
# cubestored.exe: CantPackException: superfluous data between sections | ||
compress: false | ||
# Please use minimal possible version of macOS, because it produces constraint on libstdc++ | ||
- os: macos-11 | ||
target: x86_64-apple-darwin | ||
executable_name: cubestored | ||
strip: true | ||
compress: true | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Disable rustup update (issue workaround for Windows) | ||
run: rustup set auto-self-update disable | ||
if: contains(runner.os, 'windows') | ||
shell: bash | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: ./rust/cubestore -> target | ||
prefix-key: v0-rust-cubestore-cross | ||
key: target-${{ matrix.target }} | ||
- run: source .github/actions/${{ matrix.before_script }}.sh | ||
if: ${{ matrix.before_script }} | ||
shell: bash | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
if: ${{ startsWith(matrix.os, 'windows') }} | ||
- name: Install OpenSSL for Windows | ||
if: ${{ startsWith(matrix.os, 'windows') }} | ||
run: vcpkg integrate install; vcpkg install openssl:x64-windows | ||
- name: Instal LLVM for Windows | ||
if: ${{ startsWith(matrix.os, 'windows') }} | ||
run: choco install -y --force llvm --version 18.1.2 | ||
- name: Set Env Variables for Windows | ||
uses: allenevans/[email protected] | ||
if: ${{ startsWith(matrix.os, 'windows') }} | ||
with: | ||
OPENSSL_DIR: 'C:/vcpkg/packages/openssl_x64-windows' | ||
# This paths are required to work with static linking | ||
OPENSSL_LIB_DIR: 'C:/vcpkg/packages/openssl_x64-windows/lib' | ||
OPENSSL_INCLUDE_DIR: 'C:/vcpkg/packages/openssl_x64-windows/include' | ||
LIBCLANG_PATH: 'C:\Program Files\LLVM\bin' | ||
- name: Build with Cargo | ||
run: | | ||
cd rust/cubestore && cargo build --release --target=${{ matrix.target }} | ||
- name: Compress binaries | ||
uses: svenstaro/upx-action@v2 | ||
if: ${{ matrix.compress }} | ||
with: | ||
file: rust/cubestore/target/${{ matrix.target }}/release/${{ matrix.executable_name }} | ||
args: --lzma | ||
strip: ${{ matrix.strip }} | ||
- name: Create folder for archive | ||
run: | | ||
mkdir cubestore-archive | ||
mkdir cubestore-archive/bin | ||
- name: Copy/paste OpenSSL to Archive (hotfix for Windows) | ||
if: ${{ startsWith(matrix.os, 'windows') }} | ||
run: cp C:/vcpkg/packages/openssl_x64-windows/bin/*.dll cubestore-archive/bin | ||
- name: Create archive for release | ||
run: | | ||
mv rust/cubestore/target/${{ matrix.target }}/release/${{ matrix.executable_name }} cubestore-archive/bin/${{ matrix.executable_name }} | ||
cd cubestore-archive | ||
tar -cvzf cubestored-${{ matrix.target }}.tar.gz * | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: cubestore-archive/cubestored-${{ matrix.target }}.tar.gz | ||
name: cubestored-${{ matrix.target }}.tar.gz | ||
retention-days: 1 | ||
|
||
cubestore_linux: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 90 | ||
env: | ||
OPENSSL_STATIC: 1 | ||
strategy: | ||
matrix: | ||
target: | ||
- x86_64-unknown-linux-gnu | ||
- x86_64-unknown-linux-musl | ||
- x86_64-apple-darwin | ||
- aarch64-unknown-linux-gnu | ||
include: | ||
- os: ubuntu-20.04 | ||
target: x86_64-unknown-linux-gnu | ||
executable_name: cubestored | ||
cross: true | ||
strip: true | ||
compress: false | ||
- os: ubuntu-20.04 | ||
target: x86_64-unknown-linux-musl | ||
executable_name: cubestored | ||
cross: true | ||
strip: true | ||
# cubestored: CantPackException: bad DT_HASH nbucket=0x344 len=0x1890 | ||
compress: false | ||
# Please use minimal possible version of macOS, because it produces constraint on libstdc++ | ||
- os: macos-11 | ||
target: x86_64-apple-darwin | ||
executable_name: cubestored | ||
cross: false | ||
strip: true | ||
compress: true | ||
- os: ubuntu-20.04 | ||
target: aarch64-unknown-linux-gnu | ||
executable_name: cubestored | ||
cross: true | ||
# Unable to recognise the format of the input file `rust/cubestore/target/aarch64-unknown-linux-gnu/release/cubestored' | ||
strip: false | ||
# UPX is broken, issue https://github.com/cube-js/cube/issues/4474 | ||
compress: false | ||
fail-fast: false | ||
container: | ||
image: cubejs/rust-cross:${{ matrix.target }}-02042024 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Disable rustup update (issue workaround for Windows) | ||
run: rustup set auto-self-update disable | ||
if: contains(runner.os, 'windows') | ||
shell: bash | ||
- name: Setup Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2022-06-22 | ||
toolchain: nightly-2024-01-29 | ||
target: ${{ matrix.target }} | ||
override: true | ||
components: rustfmt | ||
|
@@ -246,28 +316,7 @@ jobs: | |
workspaces: ./rust/cubestore -> target | ||
prefix-key: v0-rust-cubestore-cross | ||
key: target-${{ matrix.target }} | ||
- run: source .github/actions/${{ matrix.before_script }}.sh | ||
if: ${{ matrix.before_script }} | ||
shell: bash | ||
#- name: Install dependencies Windows | ||
# run: vcpkg integrate install; vcpkg install openssl:x64-windows | ||
# if: matrix.os == 'windows-2019' | ||
# env: | ||
# VCPKG_ROOT: 'C:\vcpkg' | ||
- name: Set Env Variables for Darwin | ||
uses: allenevans/[email protected] | ||
if: ${{ matrix.target == 'x86_64-apple-darwin' }} | ||
with: | ||
OPENSSL_STATIC: "true" | ||
- name: Build with Cross | ||
if: ${{ matrix.cross }} | ||
run: | | ||
wget -c https://github.com/rust-embedded/cross/releases/download/v0.2.1/cross-v0.2.1-x86_64-unknown-linux-gnu.tar.gz -O - | tar -xz | ||
chmod +x cross && sudo mv cross /usr/local/bin/cross | ||
cd rust/cubestore | ||
cross build --release --target=${{ matrix.target }} | ||
- name: Build with Cargo | ||
if: ${{ !matrix.cross }} | ||
run: | | ||
cd rust/cubestore && cargo build --release --target=${{ matrix.target }} | ||
- name: Compress binaries | ||
|
@@ -277,10 +326,17 @@ jobs: | |
file: rust/cubestore/target/${{ matrix.target }}/release/${{ matrix.executable_name }} | ||
args: --lzma | ||
strip: ${{ matrix.strip }} | ||
- name: Create archive for release | ||
- name: Create folder for archive | ||
run: | | ||
mkdir cubestore-archive | ||
mkdir cubestore-archive/bin | ||
- name: Create archive for release | ||
run: | | ||
mv rust/cubestore/target/${{ matrix.target }}/release/${{ matrix.executable_name }} cubestore-archive/bin/${{ matrix.executable_name }} | ||
cd cubestore-archive | ||
tar cv * | gzip --best > cubestored-${{ matrix.target }}.tar.gz | ||
tar -cvzf cubestored-${{ matrix.target }}.tar.gz * | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: cubestore-archive/cubestored-${{ matrix.target }}.tar.gz | ||
name: cubestored-${{ matrix.target }}.tar.gz | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.