Skip to content

Commit 2ca8b00

Browse files
authored
Merge pull request #1038 from tychedelia/0.19-dev
Upgrade to 0.19-dev
2 parents 6845e54 + 77b5656 commit 2ca8b00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1253
-8101
lines changed

.github/workflows/nannou.yml

Lines changed: 62 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,121 @@
11
name: nannou
22
on: [push, pull_request]
33

4-
# Deny warnings for all jobs.
54
env:
6-
RUSTFLAGS: "-D warnings"
5+
CARGO_TERM_COLOR: always
6+
CARGO_INCREMENTAL: 0
77

88
# If a new commit is pushed to a PR, cancel any in-progress work on the same PR.
99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1111
cancel-in-progress: true
1212

1313
jobs:
14-
# Check the nix code is formatted.
15-
nix-fmt-check:
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v3
19-
- uses: DeterminateSystems/nix-installer-action@main
20-
- run: nix fmt -- --check ./
21-
22-
# Check the nix flake is valid on macos and linux.
23-
nix-flake-check:
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
os: [ubuntu-latest, macos-latest]
28-
runs-on: ${{ matrix.os }}
29-
steps:
30-
- uses: actions/checkout@v3
31-
- uses: DeterminateSystems/nix-installer-action@main
32-
- run: nix flake check
33-
34-
# A colleciton of cargo verifications that should pass before landing PRs.
3514
cargo:
3615
runs-on: ubuntu-latest
37-
env:
38-
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER: "lld"
16+
timeout-minutes: 30
3917
strategy:
4018
fail-fast: false
4119
matrix:
4220
include:
43-
- command: cargo fmt --verbose --all -- --check
44-
- command: cargo check --locked --workspace
45-
- command: cargo check --locked --examples --workspace
46-
- command: cargo check --locked --examples --workspace --all-features
47-
# - command: cargo test --locked --lib --bins --workspace --features "egui"
48-
- command: cargo doc --locked --workspace --features "egui"
49-
- command: cargo test --locked -p nannou_core --no-default-features --features "libm serde"
50-
# - command: cargo build --locked -p nannou --target wasm32-unknown-unknown
51-
- command: mdbook build guide/
52-
- command: cargo test --locked -p book_tests
21+
- name: fmt
22+
command: cargo fmt --verbose --all -- --check
23+
- name: check
24+
command: cargo check --locked --workspace
25+
- name: check-examples
26+
command: cargo check --locked --examples --workspace
27+
- name: check-all-features
28+
command: cargo check --locked --examples --workspace --all-features
29+
- name: test-core
30+
command: cargo test --locked -p nannou_core --no-default-features --features "libm serde"
31+
- name: test-book
32+
command: cargo test --locked -p book_tests
33+
- name: book
34+
command: mdbook build guide/
5335
steps:
54-
- uses: actions/checkout@v3
55-
- uses: DeterminateSystems/nix-installer-action@main
36+
- uses: actions/checkout@v4
37+
- uses: dtolnay/rust-toolchain@stable
38+
with:
39+
components: rustfmt
5640
- uses: Swatinem/rust-cache@v2
57-
- run: nix develop --command ${{ matrix.command }}
41+
- name: Install Linux dependencies
42+
run: >
43+
sudo apt-get update &&
44+
sudo apt-get install --no-install-recommends -y
45+
libasound2-dev
46+
libudev-dev
47+
libwayland-dev
48+
libxkbcommon-dev
49+
libvulkan-dev
50+
libclang-dev
51+
libavcodec-dev
52+
libavformat-dev
53+
libavutil-dev
54+
libavfilter-dev
55+
libavdevice-dev
56+
libswscale-dev
57+
libswresample-dev
58+
pkg-config
59+
- name: Install mdbook
60+
if: matrix.name == 'book'
61+
run: cargo install mdbook --locked
62+
- name: ${{ matrix.name }}
63+
run: ${{ matrix.command }}
5864

59-
# Synchronise the verification jobs under one that we can depend on for publish jobs.
6065
verifications:
61-
needs:
62-
[
63-
cargo,
64-
nix-flake-check,
65-
nix-fmt-check,
66-
]
66+
needs: [cargo]
6767
runs-on: ubuntu-latest
6868
steps:
6969
- run: echo "Verifications complete"
7070

7171
# Publish all the crates.
72-
# TODO: There's probs a single action out there for publishing a whole workspacce?
7372
cargo-publish:
7473
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
75-
needs: [ verifications ]
74+
needs: [verifications]
7675
env:
7776
CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
7877
runs-on: ubuntu-latest
7978
steps:
80-
- uses: actions/checkout@v3
81-
- uses: DeterminateSystems/nix-installer-action@main
79+
- uses: actions/checkout@v4
80+
- uses: dtolnay/rust-toolchain@stable
8281
- uses: Swatinem/rust-cache@v2
8382
- name: Cargo publish nannou_core
8483
continue-on-error: true
85-
run: nix develop --command cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_core/Cargo.toml
84+
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_core/Cargo.toml
8685
- name: Cargo publish nannou_wgpu
8786
continue-on-error: true
88-
run: nix develop --command cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_wgpu/Cargo.toml
87+
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_wgpu/Cargo.toml
8988
- name: Cargo publish nannou_mesh
9089
continue-on-error: true
91-
run: nix develop --command cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_mesh/Cargo.toml
90+
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_mesh/Cargo.toml
9291
- name: Cargo publish nannou
9392
continue-on-error: true
94-
run: nix develop --command cargo publish --token $CRATESIO_TOKEN --manifest-path nannou/Cargo.toml
93+
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou/Cargo.toml
9594
- name: Cargo publish nannou_audio
9695
continue-on-error: true
97-
run: nix develop --command cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_audio/Cargo.toml
96+
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_audio/Cargo.toml
9897
- name: Cargo publish nannou_laser
9998
continue-on-error: true
100-
run: nix develop --command cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_laser/Cargo.toml
99+
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_laser/Cargo.toml
101100
- name: Cargo publish nannou_osc
102101
continue-on-error: true
103-
run: nix develop --command cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_osc/Cargo.toml
102+
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_osc/Cargo.toml
104103
- name: Cargo publish nannou_egui
105104
continue-on-error: true
106-
run: nix develop --command cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_egui/Cargo.toml
105+
run: cargo publish --token $CRATESIO_TOKEN --manifest-path nannou_egui/Cargo.toml
107106

108107
# Publish the guide by pushing it to `deploy` branch.
109108
guide-push-to-deploy:
110109
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
111-
needs: [ verifications ]
110+
needs: [verifications]
112111
runs-on: ubuntu-latest
113112
steps:
114-
- uses: actions/checkout@v3
115-
- uses: DeterminateSystems/nix-installer-action@main
113+
- uses: actions/checkout@v4
114+
- uses: dtolnay/rust-toolchain@stable
116115
- uses: Swatinem/rust-cache@v2
117-
- run: nix develop --command mdbook build guide/
116+
- name: Install mdbook
117+
run: cargo install mdbook --locked
118+
- run: mdbook build guide/
118119
- name: Commit book to deploy branch
119120
run: |
120121
git config user.email "action@github.com"

0 commit comments

Comments
 (0)