diff --git a/.github/workflows/build_kernel.yaml b/.github/workflows/build_kernel.yaml index 3a8bce39b..da56ea911 100644 --- a/.github/workflows/build_kernel.yaml +++ b/.github/workflows/build_kernel.yaml @@ -45,7 +45,7 @@ jobs: run: cp -rL result/* . - name: Upload kernel artifacts - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: built-kernels-${{ matrix.arch }} path: | @@ -68,7 +68,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Download kernel artifacts - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: built-kernels-x86_64-linux path: . diff --git a/.github/workflows/build_kernel_macos.yaml b/.github/workflows/build_kernel_macos.yaml index d72ca9f00..3d098c063 100644 --- a/.github/workflows/build_kernel_macos.yaml +++ b/.github/workflows/build_kernel_macos.yaml @@ -19,8 +19,8 @@ jobs: run: sudo xcrun xcode-select -s /Applications/Xcode_26.0.app - name: "Install Metal Toolchain" run: xcodebuild -downloadComponent metalToolchain - - uses: actions/checkout@v6 - - uses: cachix/install-nix-action@v31 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31.10.4 - uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17 with: name: huggingface diff --git a/.github/workflows/build_kernel_rocm.yaml b/.github/workflows/build_kernel_rocm.yaml index 6c3c54d8a..5d3c4969f 100644 --- a/.github/workflows/build_kernel_rocm.yaml +++ b/.github/workflows/build_kernel_rocm.yaml @@ -16,7 +16,7 @@ jobs: runs-on: group: aws-highmemory-32-plus-nix steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 with: extra-conf: | diff --git a/.github/workflows/build_kernel_windows.yaml b/.github/workflows/build_kernel_windows.yaml index 91e235065..64a265dba 100644 --- a/.github/workflows/build_kernel_windows.yaml +++ b/.github/workflows/build_kernel_windows.yaml @@ -26,7 +26,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/cache@v5 + - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: key: cuda-toolkit-v${{ matrix.cuda }}-${{ matrix.os }} path: | @@ -34,10 +34,10 @@ jobs: ~/.cargo/registry ~/.cargo/git - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # CUDA environment setup - - uses: huggingface/cuda-toolkit@v0.1.0 + - uses: huggingface/cuda-toolkit@714c97b32958862237b96401fb253a4261453c3b # v0.1.0 id: setup-cuda-toolkit with: cuda: ${{ matrix.torch.cuda }} # TODO(mfuntowicz): How can we test multiple CUDA versions than align with torch? @@ -45,7 +45,7 @@ jobs: run: nvcc -V # Rust build environment setup - - uses: actions-rs/toolchain@v1 + - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 with: toolchain: stable profile: minimal @@ -55,7 +55,7 @@ jobs: run: ( cd kernel-builder && cargo build --release ) # Python environment setup - - uses: actions/setup-python@v6 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python }} cache: 'pip' diff --git a/.github/workflows/build_kernel_xpu.yaml b/.github/workflows/build_kernel_xpu.yaml index 098535969..4abe7cfaf 100644 --- a/.github/workflows/build_kernel_xpu.yaml +++ b/.github/workflows/build_kernel_xpu.yaml @@ -16,7 +16,7 @@ jobs: runs-on: group: aws-highmemory-32-plus-nix steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 with: extra-conf: | diff --git a/.github/workflows/check_variants.yaml b/.github/workflows/check_variants.yaml index c27101ea0..45ce5d6b7 100644 --- a/.github/workflows/check_variants.yaml +++ b/.github/workflows/check_variants.yaml @@ -15,8 +15,8 @@ jobs: name: Check build variants runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - uses: cachix/install-nix-action@v31 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: cachix/install-nix-action@616559265b40713947b9c190a8ff4b507b5df49b # v31.10.4 with: nix_path: nixpkgs=channel:nixos-unstable - name: Generate variants JSON diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d5844e036..a2c1e02e3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,12 +12,12 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Run ruff check - uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3 + uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3.6.1 with: src: kernels version: ${{ env.RUFF_VERSION }} - name: Run ruff format check - uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3 + uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3.6.1 with: src: kernels version: ${{ env.RUFF_VERSION }} @@ -33,7 +33,7 @@ jobs: with: fetch-depth: 0 - name: Install uv and set the python version - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 with: python-version: "3.12" - name: Check for breaking changes diff --git a/.github/workflows/nix_checks.yml b/.github/workflows/nix_checks.yml index a21b42666..a0a5de7bc 100644 --- a/.github/workflows/nix_checks.yml +++ b/.github/workflows/nix_checks.yml @@ -13,7 +13,7 @@ jobs: runs-on: group: aws-highmemory-32-plus-nix steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 with: extra-conf: | diff --git a/.github/workflows/publish_kernels.yml b/.github/workflows/publish_kernels.yml index 2a9e088de..6ecf24601 100644 --- a/.github/workflows/publish_kernels.yml +++ b/.github/workflows/publish_kernels.yml @@ -12,7 +12,7 @@ jobs: with: persist-credentials: false - name: Set up Python - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "3.9" - name: Install pypa/build @@ -24,7 +24,7 @@ jobs: - name: Build a binary wheel and a source tarball run: ( cd kernels && python3 -m build ) - name: Store the distribution packages - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: python-package-distributions path: kernels/dist/ @@ -44,7 +44,7 @@ jobs: steps: - name: Download all the dists - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: python-package-distributions path: dist/ @@ -65,7 +65,7 @@ jobs: steps: - name: Download all the dists - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: python-package-distributions path: dist/ @@ -109,7 +109,7 @@ jobs: steps: - name: Download all the dists - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: python-package-distributions path: dist/ diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index cc2f95854..1e4c4fe89 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -7,8 +7,8 @@ jobs: name: Rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dtolnay/rust-toolchain@e081816240890017053eacbb1bdf337761dc5582 # 1.95.0 with: components: rustfmt - name: Cargo fmt (kernel-abi-check) @@ -26,8 +26,8 @@ jobs: name: Clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - uses: actions/cache@v5 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: | ~/.cargo/bin/ @@ -36,7 +36,7 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@e081816240890017053eacbb1bdf337761dc5582 # 1.95.0 with: components: clippy - name: Clippy (kernel-abi-check) diff --git a/.github/workflows/test_e2e.yaml b/.github/workflows/test_e2e.yaml index 99d8cef9c..f93ecd653 100644 --- a/.github/workflows/test_e2e.yaml +++ b/.github/workflows/test_e2e.yaml @@ -31,14 +31,14 @@ jobs: outputs: variant: ${{ steps.variant.outputs.name }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 with: extra-conf: | max-jobs = 8 cores = 12 sandbox-fallback = false - - uses: cachix/cachix-action@v16 + - uses: cachix/cachix-action@3ba601ff5bbb07c7220846facfa2cd81eeee15a1 # v16 with: name: huggingface authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" @@ -107,10 +107,10 @@ jobs: env: UV_PYTHON_PREFERENCE: only-managed steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv and set Python version - uses: astral-sh/setup-uv@v7 + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 with: python-version: "3.12" diff --git a/.github/workflows/test_extra_commands.yaml b/.github/workflows/test_extra_commands.yaml index 99d78aa42..84b54af45 100644 --- a/.github/workflows/test_extra_commands.yaml +++ b/.github/workflows/test_extra_commands.yaml @@ -15,7 +15,7 @@ jobs: name: Build kernel runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 with: extra-conf: | diff --git a/.github/workflows/test_kernels.yaml b/.github/workflows/test_kernels.yaml index 3527d1d93..861d18929 100644 --- a/.github/workflows/test_kernels.yaml +++ b/.github/workflows/test_kernels.yaml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv and set the python version - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/test_python.yaml b/.github/workflows/test_python.yaml index e26b8d71c..de57b4658 100644 --- a/.github/workflows/test_python.yaml +++ b/.github/workflows/test_python.yaml @@ -28,10 +28,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv and set the python version - uses: astral-sh/setup-uv@v7 + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 with: python-version: ${{ matrix.python-version }} @@ -53,10 +53,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv and set the python version - uses: astral-sh/setup-uv@v7 + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 with: python-version: ${{ matrix.python-version }} diff --git a/Makefile b/Makefile index 394d19b55..3c0f975f1 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: style kernel-builder-cli-docs quality +.PHONY: style kernel-builder-cli-docs quality pin-actions export check_dirs := kernels/src kernels/tests kernels-data/bindings/python @@ -21,6 +21,9 @@ kernel-builder-cli-docs: > docs/source/builder-cli.md @echo "Generated docs/source/builder-cli.md" +pin-actions: + pinact run + quality: ruff format --check ${check_dirs} ruff check ${check_dirs} diff --git a/flake.nix b/flake.nix index f198d57a4..5b435248d 100644 --- a/flake.nix +++ b/flake.nix @@ -148,6 +148,7 @@ kernel-builder kernel-abi-check nodejs # For hf-doc-builder. + pinact pkg-config rust ];