Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cubestore): Upgrade rust to 1.77.0-nightly (635124704 2024-01-27) #7640

Merged
merged 9 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .github/workflows/birdbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ jobs:
run: rustup set auto-self-update disable
if: contains(runner.os, 'windows')
shell: bash
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-06-22
override: true
components: rustfmt
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -100,12 +94,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-06-22
override: true
components: rustfmt
- name: Install Node.js 18.x
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -169,12 +157,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-06-22
override: true
components: rustfmt
- name: Install Node.js 18.x
uses: actions/setup-node@v3
with:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ jobs:
run: rustup set auto-self-update disable
if: contains(runner.os, 'windows')
shell: bash
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-06-22
override: true
components: rustfmt
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/drivers-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-06-22
override: true
components: rustfmt

- name: Install Node.js 18.x
uses: actions/setup-node@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ jobs:
- 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
Expand Down Expand Up @@ -738,7 +738,7 @@ jobs:
- 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
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,23 +225,16 @@ jobs:
df -h
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-06-22
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v2
with:
workspaces: ./rust/cubestore -> target
# Separate path for release key to protect cache bloating
shared-key: cubestore-release
key: ubuntu-20.04
- name: Build cubestore
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path rust/cubestore/Cargo.toml -j 4 --release
- name: Build Cube Store
run: |
cd rust/cubestore
cargo build --release -j 4
- name: 'Upload cubestored-x86_64-unknown-linux-gnu-release artifact'
uses: actions/upload-artifact@v3
with:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/rust-cubesql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ jobs:
with:
# pulls all commits (needed for codecov)
fetch-depth: 2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-06-22
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v2
with:
workspaces: ./rust/cubesql -> target
Expand Down
138 changes: 97 additions & 41 deletions .github/workflows/rust-cubestore-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
11 changes: 2 additions & 9 deletions .github/workflows/rust-cubestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
rust: [nightly-2022-06-22]
rust: [nightly-2024-01-29]
env:
RUST: ${{ matrix.rust }}
steps:
Expand Down Expand Up @@ -149,13 +149,6 @@ jobs:
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
target: ${{ matrix.target }}
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v2
with:
workspaces: ./rust/cubestore -> target
Expand Down Expand Up @@ -247,7 +240,7 @@ jobs:
- 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
Expand Down
Loading
Loading