Skip to content

Commit

Permalink
upgrade to rust v1.78 and llvm-18
Browse files Browse the repository at this point in the history
  • Loading branch information
Congyuwang committed May 10, 2024
1 parent 698c7cc commit 3c25baf
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 40 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
py_version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Install llvm-17
run: brew install llvm@17
- name: Install llvm-18
run: brew install llvm@18
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_version }}
architecture: x64
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.78.0
default: true
- name: Build wheels
run: |
Expand Down Expand Up @@ -69,23 +69,23 @@ jobs:
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: 17.0
directory: ${{ runner.temp }}/llvm-17.0
version: 18.1
directory: ${{ runner.temp }}/llvm-18.1
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.78.0
default: true
- name: Build wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
env:
LIBCLANG_PATH: ${{ runner.temp }}/llvm-17.0/lib
CC: ${{ runner.temp }}/llvm-17.0/bin/clang-cl
CXX: ${{ runner.temp }}/llvm-17.0/bin/clang-cl
AR: ${{ runner.temp }}/llvm-17.0/bin/llvm-lib
LIBCLANG_PATH: ${{ runner.temp }}/llvm-18.1/lib
CC: ${{ runner.temp }}/llvm-18.1/bin/clang-cl
CXX: ${{ runner.temp }}/llvm-18.1/bin/clang-cl
AR: ${{ runner.temp }}/llvm-18.1/bin/llvm-lib
CFLAGS: "/clang:-flto=thin /clang:-O3 /clang:-fuse-ld=lld-link"
CXXFLAGS: "/clang:-flto=thin /clang:-O3 /clang:-fuse-ld=lld-link"
RUSTFLAGS: "-Clinker-plugin-lto -Clinker=lld-link"
Expand Down Expand Up @@ -115,12 +115,12 @@ jobs:
- name: Build Wheels
uses: messense/maturin-action@v1
with:
rust-toolchain: stable
rust-toolchain: 1.78.0
rustup-components: rustfmt
target: ${{ matrix.target }}
manylinux: 2_28
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12'
container: congyuwang/manylinux_2_28_x86_64:llvm-17.0.6
container: congyuwang/manylinux_2_28_x86_64:llvm-18.1.5
env:
LIBCLANG_PATH: /usr/local/lib
CC: /usr/local/bin/clang
Expand Down Expand Up @@ -156,12 +156,12 @@ jobs:
- name: Build Wheels
uses: messense/maturin-action@v1
with:
rust-toolchain: stable
rust-toolchain: 1.78.0
rustup-components: rustfmt
target: ${{ matrix.target }}
manylinux: 2014
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12'
container: congyuwang/manylinux2014_x86_64:llvm-17.0.6
container: congyuwang/manylinux2014_x86_64:llvm-18.1.5
env:
LIBCLANG_PATH: /usr/local/lib
CC: /usr/local/bin/clang
Expand Down Expand Up @@ -195,12 +195,12 @@ jobs:
- name: Build Wheels
uses: messense/maturin-action@v1
with:
rust-toolchain: stable
rust-toolchain: 1.78.0
rustup-components: rustfmt
target: ${{ matrix.target }}
manylinux: 2_28
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12'
container: congyuwang/manylinux_2_28_aarch64:llvm-17.0.6
container: congyuwang/manylinux_2_28_aarch64:llvm-18.1.5
docker-options: "-e BINDGEN_EXTRA_CLANG_ARGS"
before-script-linux: |
ln -s /usr/aarch64-unknown-linux-gnu/lib/gcc/aarch64-unknown-linux-gnu/7.5.0/crtbeginS.o /usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/lib/crtbeginS.o
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
py_version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Install llvm-17
run: brew install llvm@17
- name: Install llvm-18
run: brew install llvm@18
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_version }}
architecture: x64
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.78.0
default: true
- name: Build wheels
run: |
Expand Down Expand Up @@ -69,23 +69,23 @@ jobs:
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: 17.0
directory: ${{ runner.temp }}/llvm-17.0
version: 18.1
directory: ${{ runner.temp }}/llvm-18.1
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.78.0
default: true
- name: Build wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
env:
LIBCLANG_PATH: ${{ runner.temp }}/llvm-17.0/lib
CC: ${{ runner.temp }}/llvm-17.0/bin/clang-cl
CXX: ${{ runner.temp }}/llvm-17.0/bin/clang-cl
AR: ${{ runner.temp }}/llvm-17.0/bin/llvm-lib
LIBCLANG_PATH: ${{ runner.temp }}/llvm-18.1/lib
CC: ${{ runner.temp }}/llvm-18.1/bin/clang-cl
CXX: ${{ runner.temp }}/llvm-18.1/bin/clang-cl
AR: ${{ runner.temp }}/llvm-18.1/bin/llvm-lib
CFLAGS: "/clang:-flto=thin /clang:-O3 /clang:-fuse-ld=lld-link"
CXXFLAGS: "/clang:-flto=thin /clang:-O3 /clang:-fuse-ld=lld-link"
RUSTFLAGS: "-Clinker-plugin-lto -Clinker=lld-link"
Expand Down Expand Up @@ -115,12 +115,12 @@ jobs:
- name: Build Wheels
uses: messense/maturin-action@v1
with:
rust-toolchain: stable
rust-toolchain: 1.78.0
rustup-components: rustfmt
target: ${{ matrix.target }}
manylinux: 2_28
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12'
container: congyuwang/manylinux_2_28_x86_64:llvm-17.0.6
container: congyuwang/manylinux_2_28_x86_64:llvm18.1.5
env:
LIBCLANG_PATH: /usr/local/lib
CC: /usr/local/bin/clang
Expand Down Expand Up @@ -156,12 +156,12 @@ jobs:
- name: Build Wheels
uses: messense/maturin-action@v1
with:
rust-toolchain: stable
rust-toolchain: 1.78.0
rustup-components: rustfmt
target: ${{ matrix.target }}
manylinux: 2014
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12'
container: congyuwang/manylinux2014_x86_64:llvm-17.0.6
container: congyuwang/manylinux2014_x86_64:llvm-18.1.5
env:
LIBCLANG_PATH: /usr/local/lib
CC: /usr/local/bin/clang
Expand Down Expand Up @@ -195,12 +195,12 @@ jobs:
- name: Build Wheels
uses: messense/maturin-action@v1
with:
rust-toolchain: stable
rust-toolchain: 1.78.0
rustup-components: rustfmt
target: ${{ matrix.target }}
manylinux: 2_28
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12'
container: congyuwang/manylinux_2_28_aarch64:llvm-17.0.6
container: congyuwang/manylinux_2_28_aarch64:llvm-18.1.5
docker-options: "-e BINDGEN_EXTRA_CLANG_ARGS"
before-script-linux: |
ln -s /usr/aarch64-unknown-linux-gnu/lib/gcc/aarch64-unknown-linux-gnu/7.5.0/crtbeginS.o /usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/lib/crtbeginS.o
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
# documentation.
# rust-clippy is a tool that runs a bunch of lints to catch common
# mistakes in your Rust code and help improve your Rust code.
# More details at https://github.com/rust-lang/rust-clippy
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/

name: rust-clippy analyze

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '38 1 * * 3'
- cron: "38 1 * * 3"

jobs:
rust-clippy-analyze:
Expand All @@ -25,7 +25,7 @@ jobs:
permissions:
contents: read
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -34,16 +34,15 @@ jobs:
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.78.0
components: clippy
override: true

- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt

- name: Run rust-clippy
run:
cargo clippy
run: cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
Expand Down

0 comments on commit 3c25baf

Please sign in to comment.