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

chore: Raise MSRV to 1.70.0 #479

Merged
merged 7 commits into from
Oct 2, 2023
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
6 changes: 0 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-latest ]
rust: [ '1.65.0' ]
dfx: [ '0.8.4', '0.9.2', '0.10.1', '0.11.1' ]

steps:
Expand All @@ -24,11 +23,6 @@ jobs:
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1
- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup component add rustfmt

- name: Provision Darwin
if: contains(matrix.os, 'macos')
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: ["1.65.0"]
os: [ubuntu-latest]

steps:
Expand All @@ -23,11 +22,6 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1

- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup component add rustfmt
- name: Run Cargo Fmt
run: cargo fmt --all -- --check
env:
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/ic-ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ jobs:
ic-hs-ref: "3d71032e"
wallet-tag: "20230308"
os: ubuntu-latest
rust: "1.65.0"

steps:
- uses: actions/setup-node@v3
with:
node-version: 16

- uses: actions/checkout@v2
with:
path: main

- name: Install dfx
uses: dfinity/setup-dfx@main
Expand All @@ -42,12 +39,6 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown

- name: Download cycles-wallet canister
run: |
wget https://github.com/dfinity/cycles-wallet/releases/download/${{ matrix.wallet-tag }}/wallet.wasm
Expand All @@ -67,7 +58,6 @@ jobs:
export IC_REF_PORT=$(dfx info replica-port)
export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm
export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm
cd main
cargo test --all-features -- --ignored
dfx stop
env:
Expand All @@ -94,7 +84,7 @@ jobs:
export IC_REF_PORT=$(dfx info replica-port)
export IC_UNIVERSAL_CANISTER_PATH=$HOME/canister.wasm
export IC_WALLET_CANISTER_PATH=$HOME/wallet.wasm
cd main/ref-tests
cd ref-tests
cargo test --all-features -- --ignored --nocapture --test-threads=1
dfx stop
env:
Expand All @@ -111,7 +101,6 @@ jobs:
dfx start --background --clean
sleep 1
export IC_REF_PORT=$(dfx info replica-port)
cd main
cargo test --all-features --doc -- --ignored
dfx stop
env:
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: ["1.65.0"]
os: [ubuntu-latest]

steps:
Expand All @@ -22,18 +21,12 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup component add clippy
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown
- name: Run Lint
run: cargo clippy --verbose --tests --benches -- -D warnings
env:
RUST_BACKTRACE: 1
- name: Run Lint (WASM)
run: CARGO_TARGET_DIR=target/wasm cargo clippy --target wasm32-unknown-unknown -p ic-agent --features wasm-bindgen -p ic-utils --verbose -- -D clippy::all
run: CARGO_TARGET_DIR=target/wasm cargo clippy --target wasm32-unknown-unknown -p ic-agent --features wasm-bindgen -p ic-utils --verbose -- -D warnings
aggregate:
name: lint:required
runs-on: ubuntu-latest
Expand Down
30 changes: 13 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: ['linux', 'macos']
include:
- os: ubuntu-latest
name: linux
target: x86_64-unknown-linux-musl
binary_path: target/x86_64-unknown-linux-musl/release
binary_files: icx
rust: '1.65.0'
- os: macos-latest
name: macos
binary_path: target/release
target: x86_64-apple-darwin
binary_path: target/x86_64-apple-darwin/release
binary_files: icx
rust: '1.65.0'
steps:
- uses: actions/checkout@master

Expand All @@ -34,11 +36,12 @@ jobs:
echo "--locked --release $binaries" >> $GITHUB_ENV
echo "END" >> $GITHUB_ENV

- name: Static build
uses: dfinity/rust-musl-action@master
- name: Build
uses: ructions/cargo@v1
with:
args: cargo build --target x86_64-unknown-linux-musl ${{ env.cargo_build_ARGS }}
if: contains(matrix.os, 'ubuntu')
command: build
args: --target ${{ matrix.target }} ${{ env.cargo_build_ARGS }}
use-cross: ${{ contains(matrix.os, 'ubuntu') }}

- name: Strip binaries
run: |
Expand All @@ -47,25 +50,18 @@ jobs:
strip ${{ matrix.binary_files }}
if: contains(matrix.os, 'ubuntu')

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
if: contains(matrix.os, 'macos')

- name: Dynamic build
- name: Check linkage
run: |
cargo build ${{ env.cargo_build_ARGS }}
cd ${{ matrix.binary_path }}
otool -L ${{ matrix.binary_files }}
if: contains(matrix.os, 'macos')

- name: Create tarball of binaries
if: ${{ github.event_name == 'push' }}
run: tar -zcC ${{ matrix.binary_path }} -f binaries.tar.gz ${{ matrix.binary_files }}

- name: Upload tarball
if: ${{ github.event_name == 'push' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: ["1.65.0"]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand All @@ -25,12 +24,6 @@ jobs:
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1

- name: Install Rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown

- name: Install wasm-pack
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
Expand All @@ -52,7 +45,7 @@ jobs:
- name: Run Tests (WASM)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
CARGO_TARGET_DIR=../target/wasm wasm-pack test --chrome --headless ic-agent --features wasm-bindgen
CARGO_TARGET_DIR=target/wasm wasm-pack test --chrome --headless ic-agent --features wasm-bindgen

- name: Purge for OSX
if: matrix.os == 'macos-latest'
Expand Down
Loading
Loading