diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d749157..e1db586 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,23 +6,25 @@ on: jobs: macos: - runs-on: macos-latest + runs-on: macos-13 strategy: fail-fast: false matrix: 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 - - uses: actions/setup-python@v4 + - name: Install llvm-18 + run: | + brew update + brew install llvm@18 + - uses: actions/setup-python@v5 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: | @@ -62,19 +64,19 @@ jobs: py_version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.py_version }} architecture: ${{ matrix.target }} - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v1 + uses: KyleMayes/install-llvm-action@v2 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 @@ -82,10 +84,10 @@ jobs: 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" @@ -108,19 +110,19 @@ jobs: target: [x86_64] steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.9 architecture: x64 - 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 @@ -149,19 +151,19 @@ jobs: target: [x86_64] steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.9 architecture: x64 - 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 @@ -189,18 +191,18 @@ jobs: target: [aarch64] steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.9 - 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 @@ -253,7 +255,7 @@ jobs: - uses: actions/download-artifact@v2 with: name: wheels - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.9 - name: Publish to PyPi diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 56312db..a624970 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -6,23 +6,25 @@ on: jobs: macos: - runs-on: macos-latest + runs-on: macos-13 strategy: fail-fast: false matrix: 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 - - uses: actions/setup-python@v4 + - name: Install llvm-18 + run: | + brew update + brew install llvm@18 + - uses: actions/setup-python@v5 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: | @@ -62,19 +64,19 @@ jobs: py_version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.py_version }} architecture: ${{ matrix.target }} - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v1 + uses: KyleMayes/install-llvm-action@v2 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 @@ -82,10 +84,10 @@ jobs: 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" @@ -108,19 +110,19 @@ jobs: target: [x86_64] steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.9 architecture: x64 - 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 @@ -149,19 +151,19 @@ jobs: target: [x86_64] steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.9 architecture: x64 - 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 @@ -189,18 +191,18 @@ jobs: target: [aarch64] steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.9 - 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 diff --git a/.github/workflows/rust-clippy.yml b/.github/workflows/rust-clippy.yml index eefbff7..284f7c2 100644 --- a/.github/workflows/rust-clippy.yml +++ b/.github/workflows/rust-clippy.yml @@ -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: @@ -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 @@ -34,7 +34,7 @@ jobs: uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1 with: profile: minimal - toolchain: stable + toolchain: 1.78.0 components: clippy override: true @@ -42,8 +42,7 @@ jobs: 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