Update to use rust-toolchain toml (#284)

* Update to the new rust-toolchain format

* Remove unneeded docs

* Update CI for toolchain file

* Update ci.yaml

* Update ci.yaml

* Update deploy_docs.yml

* Update ci.yaml

* Update deploy_docs.yml

* Remove redundant `rustup component add` commands from ci.yaml.

* Shorten "Continuous integration" to "CI" in ci.yaml.

* Add a helpful message above the TOML in rust-toolchain.

* Don't update rustup in ci.yaml, GHA already has the right version.

Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
This commit is contained in:
XAMPPRocky 2020-12-09 15:43:00 +00:00 committed by GitHub
parent a942b6c425
commit ca8b389b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 34 deletions

View File

@ -4,7 +4,7 @@ on:
- main
pull_request:
name: Continuous integration
name: CI
jobs:
check:
@ -22,12 +22,7 @@ jobs:
env:
spirv_tools_version: "20200928"
steps:
# Note that we are explicitly NOT checking out submodules, to validate
# that we haven't accidentally enabled spirv-tools native compilation
# and regressed CI times
- uses: actions/checkout@v2
with:
submodules: "false"
# Ubuntu does have `brew install spirv-tools`, but it installs from
# source and so takes >8 minutes.
- if: ${{ runner.os == 'Linux' }}
@ -53,8 +48,6 @@ jobs:
- if: ${{ runner.os == 'Windows' }}
# Runs separately to add spir-v tools to Powershell's Path.
run: echo "$HOME/spirv-tools/install/bin" >> $env:GITHUB_PATH
- name: Install rustup components
run: rustup component add rust-src rustc-dev llvm-tools-preview
# Fetch dependencies in a separate step to clearly show how long each part
# of the testing takes
- name: cargo fetch --locked
@ -106,7 +99,7 @@ jobs:
curl -fL https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/linux-clang-release/continuous/1305/20201026-063148/install.tgz | tar -xz -C "${HOME}/spirv-tools"
echo "${HOME}/spirv-tools/install/bin" >> $GITHUB_PATH
- name: Install rustup components
run: rustup component add rustfmt clippy rust-src rustc-dev llvm-tools-preview
run: rustup component add rustfmt clippy
- name: cargo fetch --locked
run: cargo fetch --locked
- name: Rustfmt

View File

@ -8,7 +8,8 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: rustup component add rustfmt clippy rust-src rustc-dev llvm-tools-preview
- run: sh <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y
shell: bash
- run: brew install mdbook spirv-tools
- run: mkdir docs-build/
- run: $(cd docs && mdbook build -d ../docs-build/book)

View File

@ -7,22 +7,6 @@
git clone --recurse-submodules https://github.com/EmbarkStudios/rust-gpu
```
1. Install the prerequisites using the provided setup script. From the root of the project, run:
MacOS, Linux:
```shell
sh setup.sh
```
Windows:
```shell
setup.bat
```
The setup script installs nightly Rust (required for now, see [#78](https://github.com/EmbarkStudios/rust-gpu/issues/78) for tracking issue).
1. **optional** Install [SPIRV-Tools](https://github.com/KhronosGroup/SPIRV-Tools#downloads) and add it to your `PATH`. You can skip this step if you just want to run examples with the defaults. See [Using installed SPIRV-Tools](#using-installed-spirv-tools) if you decide to go with this option.
1. Next, look at the [examples] folder. There are two kinds of targets here: [runners] and [shaders]. The projects inside `shaders` are "GPU crates", i.e. ones that will be compiled one or more SPIR-V modules. The `runner` projects are normal, CPU crates that use some graphics backend (currently, we have a [`wgpu` runner][examples/runners/wgpu], a [Vulkan runner][examples/runners/ash] through `ash`, and a barebones pure software [CPU runner][examples/runners/cpu]) to actually run one of the "GPU crate" shaders.

View File

@ -9,4 +9,3 @@ more information on how to get started.
Alternatively if you're looking to contribute to the `rust-gpu` project, have
a look at [_"Building Rust-GPU"_](./building-rust-gpu.md) section.

View File

@ -1 +1,9 @@
nightly-2020-11-24
# If you see this, run `rustup self update` to get rustup 1.23 or newer.
# NOTE: above comment is for older `rustup` (before TOML support was added),
# which will treat the first line as the toolchain name, and therefore show it
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".
[toolchain]
channel = "nightly-2020-11-24"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

View File

@ -1,3 +0,0 @@
setlocal
rustup toolchain install nightly-2020-11-24 --component rust-src rustc-dev llvm-tools-preview

View File

@ -1,3 +0,0 @@
#!/usr/bin/env bash
rustup toolchain install nightly-2020-11-24 --component rust-src rustc-dev llvm-tools-preview