diff --git a/.github/actions/setup-linux/action.yml b/.github/actions/setup-linux/action.yml deleted file mode 100644 index 3a25ba8287..0000000000 --- a/.github/actions/setup-linux/action.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Setup Linux Runner -description: Installs drivers and prepare the Linux runner - -inputs: - vulkan-sdk-version: - type: string - description: The version of the Vulkan SDK to install - required: true - mesa-version: - type: string - description: The version fo the MESA graphic library to install - required: true - mesa-ci-build-version: - type: string - description: The build version fo the MESA graphic library to install - required: true - -runs: - using: "composite" - steps: - - name: Free disk space - shell: bash - run: | - df -h - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - df -h - cargo clean --package burn-tch - # -------------------------------------------------------------------------------- - - name: Install llvmpipe and lavapipe - shell: bash - run: | - sudo apt-get update -y -qq - for i in {1..5}; do - sudo add-apt-repository ppa:kisak/kisak-mesa -y && break || sleep 5; - done - sudo apt-get update - sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers - # -------------------------------------------------------------------------------- - - name: Install Vulkan SDK - # from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml - shell: bash - run: | - set -e - - sudo apt-get update -y -qq - - # vulkan sdk - wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-${{ inputs.vulkan-sdk-version }}-jammy.list https://packages.lunarg.com/vulkan/${{ inputs.vulkan-sdk-version }}/lunarg-vulkan-${{ inputs.vulkan-sdk-version }}-jammy.list - - sudo apt-get update - sudo apt install -y vulkan-sdk - # -------------------------------------------------------------------------------- - - name: Install Mesa - # from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml - shell: bash - run: | - set -e - - curl -L --retry 5 https://github.com/gfx-rs/ci-build/releases/download/${{ inputs.mesa-ci-build-version}}/mesa-${{ inputs.mesa-version }}-linux-x86_64.tar.xz -o mesa.tar.xz - mkdir mesa - tar xpf mesa.tar.xz -C mesa - - # The ICD provided by the mesa build is hardcoded to the build environment. - # - # We write out our own ICD file to point to the mesa vulkan - cat <<- EOF > icd.json - { - "ICD": { - "api_version": "1.1.255", - "library_path": "$PWD/mesa/lib/x86_64-linux-gnu/libvulkan_lvp.so" - }, - "file_format_version": "1.0.0" - } - EOF - - echo "VK_DRIVER_FILES=$PWD/icd.json" >> "$GITHUB_ENV" - echo "LD_LIBRARY_PATH=$PWD/mesa/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH" >> "$GITHUB_ENV" - echo "LIBGL_DRIVERS_PATH=$PWD/mesa/lib/x86_64-linux-gnu/dri" >> "$GITHUB_ENV" diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml deleted file mode 100644 index 57cdd045a3..0000000000 --- a/.github/actions/setup-rust/action.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Checkout and setup rust with cache support -description: Bootstrap action to checkout the code, install the rust toolchain and retrieve the Rust dependency cache if any. - -inputs: - rust-toolchain: - type: string - description: Rust toolchain to install - required: true - cache-key: - type: string - description: The cache name as defined in the CI workflow matrix - required: true - -runs: - using: composite - steps: - - name: checkout - uses: actions/checkout@v4 - - name: install rust - uses: dtolnay/rust-toolchain@master - with: - components: rustfmt, clippy - toolchain: ${{ inputs.rust-toolchain }} - - name: caching - uses: Swatinem/rust-cache@v2 - with: - key: ${{ inputs.cache-key }} - prefix-key: v11-rust - cache-on-failure: false - cache-all-crates: true diff --git a/.github/actions/setup-windows/action.yml b/.github/actions/setup-windows/action.yml deleted file mode 100644 index a4a63b836e..0000000000 --- a/.github/actions/setup-windows/action.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: Setup Windows Runner -description: Installs drivers and prepare the Windows runner - -inputs: - warp-version: - type: string - description: The version WARP DirectX component - required: true - dxc-release: - type: string - description: The version of DirectX Shader Compiler - required: true - dxc-filenmae: - type: string - description: The filename of DirectX Shader Compiler archive - required: true - mesa-version: - type: string - description: The version fo the MESA graphic library to install - required: true - -runs: - using: "composite" - steps: - - name: Install dxc - # from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml - shell: bash - run: | - set -e - - curl.exe -L --retry 5 https://github.com/microsoft/DirectXShaderCompiler/releases/download/${{ inputs.dxc-release }}/${{ inputs.dxc-filename }} -o dxc.zip - 7z.exe e dxc.zip -odxc bin/x64/{dxc.exe,dxcompiler.dll,dxil.dll} - - # We need to use cygpath to convert PWD to a windows path as we're using bash. - cygpath --windows "$PWD/dxc" >> "$GITHUB_PATH" - # -------------------------------------------------------------------------------- - - name: Install WARP - # from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml - shell: bash - run: | - set -e - - # Make sure dxc is in path. - dxc --version - - curl.exe -L --retry 5 https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/${{ inputs.warp-version }} -o warp.zip - 7z.exe e warp.zip -owarp build/native/amd64/d3d10warp.dll - - mkdir -p target/llvm-cov-target/debug/deps - - cp -v warp/d3d10warp.dll target/llvm-cov-target/debug/ - cp -v warp/d3d10warp.dll target/llvm-cov-target/debug/deps - # -------------------------------------------------------------------------------- - - name: Install Mesa - # from wgpu repo: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/ci.yml - shell: bash - run: | - set -e - - curl.exe -L --retry 5 https://github.com/pal1000/mesa-dist-win/releases/download/${{ inputs.mesa-version }}/mesa3d-${{ inputs.mesa-version }}-release-msvc.7z -o mesa.7z - 7z.exe e mesa.7z -omesa x64/{opengl32.dll,libgallium_wgl.dll,libglapi.dll,vulkan_lvp.dll,lvp_icd.x86_64.json} - - cp -v mesa/* target/llvm-cov-target/debug/ - cp -v mesa/* target/llvm-cov-target/debug/deps - - # We need to use cygpath to convert PWD to a windows path as we're using bash. - echo "VK_DRIVER_FILES=`cygpath --windows $PWD/mesa/lvp_icd.x86_64.json`" >> "$GITHUB_ENV" - echo "GALLIUM_DRIVER=llvmpipe" >> "$GITHUB_ENV" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 839c3535cc..0d6dfac954 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,11 +75,8 @@ jobs: - rust: stable cache-version: stable steps: - - name: Checkout actions - uses: actions/checkout@v4 - # -------------------------------------------------------------------------------- - name: Setup Rust - uses: ./.github/actions/setup-rust + uses: tracel-ai/github-actions/actions/setup-rust@v1 with: rust-toolchain: ${{ matrix.rust }} cache-key: ${{ matrix.cache-version }}-linux @@ -116,11 +113,8 @@ jobs: - rust: stable cache-version: stable steps: - - name: Checkout actions - uses: actions/checkout@v4 - # -------------------------------------------------------------------------------- - name: Setup Rust - uses: ./.github/actions/setup-rust + uses: tracel-ai/github-actions/actions/setup-rust@v1 with: rust-toolchain: ${{ matrix.rust }} cache-key: ${{ matrix.cache-version }}-linux @@ -143,17 +137,14 @@ jobs: - rust: 1.79.0 cache-version: 1-79-0 steps: - - name: Checkout actions - uses: actions/checkout@v4 - # -------------------------------------------------------------------------------- - name: Setup Rust - uses: ./.github/actions/setup-rust + uses: tracel-ai/github-actions/actions/setup-rust@v1 with: rust-toolchain: ${{ matrix.rust }} cache-key: ${{ matrix.cache-version }}-linux # -------------------------------------------------------------------------------- - name: Setup Linux runner - uses: ./.github/actions/setup-linux + uses: tracel-ai/github-actions/actions/setup-linux@v1 with: vulkan-sdk-version: ${{ env.VULKAN_SDK_VERSION }} mesa-version: ${{ env.MESA_VERSION }} @@ -193,17 +184,14 @@ jobs: - rust: 1.79.0 cache-version: 1-79-0 steps: - - name: Checkout actions - uses: actions/checkout@v4 - # -------------------------------------------------------------------------------- - name: Setup Rust - uses: ./.github/actions/setup-rust + uses: tracel-ai/github-actions/actions/setup-rust@v1 with: rust-toolchain: ${{ matrix.rust }} cache-key: ${{ matrix.cache-version }}-linux-no-std # -------------------------------------------------------------------------------- - name: Setup Linux runner - uses: ./.github/actions/setup-linux + uses: tracel-ai/github-actions/actions/setup-linux@v1 with: vulkan-sdk-version: ${{ env.VULKAN_SDK_VERSION }} mesa-version: ${{ env.MESA_VERSION }} @@ -227,18 +215,15 @@ jobs: - rust: stable cache-version: stable steps: - - name: Checkout actions - uses: actions/checkout@v4 - # -------------------------------------------------------------------------------- - name: Setup Rust - uses: ./.github/actions/setup-rust + uses: tracel-ai/github-actions/actions/setup-rust@v1 with: rust-toolchain: ${{ matrix.rust }} cache-key: ${{ matrix.cache-version }}-windows # -------------------------------------------------------------------------------- - name: Setup Windows runner if: env.DISABLE_WGPU != '1' - uses: ./.github/actions/setup-windows + uses: tracel-ai/github-actions/actions/setup-windows@v1 with: dxc-release: ${{ env.DXC_RELEASE }} dxc-filename: ${{ env.DXC_FILENAME }} @@ -258,11 +243,8 @@ jobs: - rust: stable cache-version: stable steps: - - name: Checkout actions - uses: actions/checkout@v4 - # -------------------------------------------------------------------------------- - name: Setup Rust - uses: ./.github/actions/setup-rust + uses: tracel-ai/github-actions/actions/setup-rust@v1 with: rust-toolchain: ${{ matrix.rust }} cache-key: ${{ matrix.cache-version }}-macos diff --git a/.github/workflows/publish-crate.yml b/.github/workflows/publish-crate.yml deleted file mode 100644 index 8af51c75ec..0000000000 --- a/.github/workflows/publish-crate.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: publish-crate - -on: - workflow_call: - inputs: - crate: - required: true - type: string - secrets: - CRATES_IO_API_TOKEN: - required: true - -jobs: - publish-crate: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v3 - - - name: install rust - uses: dtolnay/rust-toolchain@stable - - - name: publish to crates.io - run: cargo xtask publish ${{ inputs.crate }} - env: - CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bfe5c117de..734a1d9c4e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,59 +7,59 @@ on: jobs: publish-burn-derive: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 with: crate: burn-derive secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-dataset: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 with: crate: burn-dataset needs: - publish-burn-common secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-common: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 with: crate: burn-common secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-compute: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-common with: crate: burn-compute secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-tensor-testgen: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 with: crate: burn-tensor-testgen secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-tensor: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-tensor-testgen - publish-burn-common with: crate: burn-tensor secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-fusion: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-tensor - publish-burn-common with: crate: burn-fusion secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-jit: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-common - publish-burn-fusion @@ -68,9 +68,9 @@ jobs: with: crate: burn-jit secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-autodiff: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-tensor - publish-burn-tensor-testgen @@ -78,18 +78,18 @@ jobs: with: crate: burn-autodiff secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-tch: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-tensor - publish-burn-autodiff with: crate: burn-tch secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-ndarray: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-tensor - publish-burn-autodiff @@ -97,9 +97,9 @@ jobs: with: crate: burn-ndarray secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-wgpu: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-tensor - publish-burn-compute @@ -110,9 +110,9 @@ jobs: with: crate: burn-wgpu secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-candle: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-tensor - publish-burn-autodiff @@ -120,9 +120,9 @@ jobs: with: crate: burn-candle secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-core: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-dataset - publish-burn-common @@ -136,34 +136,34 @@ jobs: with: crate: burn-core secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-train: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-core with: crate: burn-train secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn-core - publish-burn-train with: crate: burn secrets: inherit - + # -------------------------------------------------------------------------------- publish-burn-import: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 needs: - publish-burn with: crate: burn-import secrets: inherit - + # -------------------------------------------------------------------------------- publish-onnx-ir: - uses: tracel-ai/burn/.github/workflows/publish-crate.yml@main + uses: tracel-ai/github-actions/workflows/publish-crate.yml@v1 with: crate: onnx-ir secrets: inherit