Skip to content

Commit 1e602c2

Browse files
authored
Merge pull request #21 from tayloraswift/validate-docs
2 parents 15b0c84 + 7fecde9 commit 1e602c2

File tree

7 files changed

+126
-65
lines changed

7 files changed

+126
-65
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,49 @@ jobs:
1010
build-macos:
1111
runs-on: macos-14
1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: SwiftyLab/setup-swift@latest
15-
with:
16-
swift-version: "5.10.0"
17-
- name: build
18-
run: |
19-
swift --version
20-
swift build
21-
swift test
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: build
17+
run: |
18+
swift --version
19+
swift build
20+
swift test
2221
2322
benchmark-macos:
2423
runs-on: macos-14
2524
steps:
26-
- uses: actions/checkout@v3
27-
- uses: SwiftyLab/setup-swift@latest
28-
with:
29-
swift-version: "5.10.0"
30-
- name: Homebrew Mac
31-
if: ${{ runner.os == 'Macos' }}
32-
run: |
33-
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
34-
brew install jemalloc
35-
- name: Ubuntu deps
36-
if: ${{ runner.os == 'Linux' }}
37-
run: |
38-
sudo apt-get install -y libjemalloc-dev
39-
- name: benchmark
40-
run: |
41-
cd ExternalBenchmarks
42-
swift package benchmark
25+
- name: Checkout repository
26+
uses: actions/checkout@v3
27+
28+
- name: Homebrew Mac
29+
if: ${{ runner.os == 'Macos' }}
30+
run: |
31+
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
32+
brew install jemalloc
33+
- name: Ubuntu deps
34+
if: ${{ runner.os == 'Linux' }}
35+
run: |
36+
sudo apt-get install -y libjemalloc-dev
37+
- name: benchmark
38+
run: |
39+
cd ExternalBenchmarks
40+
swift package benchmark
4341
4442
build-linux:
45-
runs-on: ubuntu-22.04
43+
runs-on: ubuntu-24.04
4644
steps:
47-
- uses: actions/checkout@v3
48-
- uses: SwiftyLab/setup-swift@latest
49-
with:
50-
swift-version: "5.10.0"
51-
- name: build
52-
run: |
53-
swift --version
54-
swift build
55-
swift build -c release
56-
swift test
45+
- name: Install Swift
46+
uses: tayloraswift/swift-install-action@master
47+
with:
48+
swift-prefix: "swift-5.10.1-release/ubuntu2404/swift-5.10.1-RELEASE"
49+
swift-id: "swift-5.10.1-RELEASE-ubuntu24.04"
50+
51+
- name: Checkout repository
52+
uses: actions/checkout@v3
53+
54+
- name: Build and test
55+
run: |
56+
swift --version
57+
swift build -c release
58+
swift test

.github/workflows/docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This workflow validates the package’s documentation. Because documentation building involves
2+
# compiling the package, this also checks that the package itself compiles successfully on each
3+
# supported platform.
4+
name: documentation
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
linux:
14+
runs-on: ubuntu-24.04
15+
name: Ubuntu 24.04
16+
17+
steps:
18+
- name: Install Swift
19+
uses: tayloraswift/swift-install-action@master
20+
with:
21+
swift-prefix: "swift-5.10.1-release/ubuntu2404/swift-5.10.1-RELEASE"
22+
swift-id: "swift-5.10.1-RELEASE-ubuntu24.04"
23+
24+
- name: Install Unidoc
25+
uses: tayloraswift/swift-unidoc-action@master
26+
with:
27+
unidoc-version: "master"
28+
29+
# This clobbers everything in the current directory!
30+
- name: Checkout repository
31+
uses: actions/checkout@v3
32+
33+
- name: Validate documentation
34+
run: |
35+
unidoc compile -I .. \
36+
--swift-toolchain $SWIFT_INSTALLATION \
37+
--ci fail-on-errors \
38+
--package-name swift-noise
39+
40+
macos:
41+
runs-on: macos-14
42+
name: macOS
43+
env:
44+
DEVELOPER_DIR: "/Applications/Xcode_15.3.app/Contents/Developer"
45+
46+
steps:
47+
- name: Install Unidoc
48+
uses: tayloraswift/swift-unidoc-action@master
49+
with:
50+
unidoc-version: "master"
51+
52+
- name: Checkout repository
53+
uses: actions/checkout@v3
54+
55+
- name: Validate documentation
56+
run: |
57+
unidoc compile -I .. \
58+
--ci fail-on-errors \
59+
--package-name swift-noise

ExternalBenchmarks/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55
let package = Package(
66
name: "ExternalBenchmarks",
77
platforms: [
8-
.macOS(.v13),
8+
.macOS("13.3"),
99
],
1010
dependencies: [
1111
.package(url: "https://github.com/ordo-one/package-benchmark", .upToNextMajor(from: "1.0.0")),

Package.resolved

Lines changed: 20 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import PackageDescription
44

55
let package = Package(
66
name: "swift-noise",
7-
platforms: [.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6)],
8-
products:
7+
platforms: [.macOS("13.3"), .iOS("16.4"), .tvOS("16.4"), .watchOS("9.4")],
8+
products:
99
[
1010
.library(name: "Noise", targets: ["Noise"]),
1111
.executable(name: "generate-noise", targets: ["GenNoise"])
1212
],
13-
dependencies:
13+
dependencies:
1414
[
1515
.package(url: "https://github.com/tayloraswift/swift-png", from: "4.4.0")
1616
],
17-
targets:
17+
targets:
1818
[
1919
.target(
2020
name: "Noise"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
***`noise`***<br>`2.0`
44

55
[![ci build status](https://github.com/tayloraswift/swift-noise/actions/workflows/build.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/build.yml)
6+
[![ci build status](https://github.com/tayloraswift/swift-noise/actions/workflows/docs.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/docs.yml)
7+
68
[![swift package index versions](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Ftayloraswift%2Fswift-noise%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/tayloraswift/swift-noise)
79
[![swift package index platforms](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Ftayloraswift%2Fswift-noise%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/tayloraswift/swift-noise)
810

Sources/Noise/cell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ extension _CellNoise3D
565565
/// `CellNoise3D` is analogous to
566566
/// [Blender Voronoi noise](https://docs.blender.org/manual/en/dev/render/cycles/nodes/types/textures/voronoi.html),
567567
/// with the *Distance Squared* metric. The *Scale* of Blender Voronoi noise is identical to the
568-
/// ``frequency`` of `CellNoise3D`; its range is approximately `0 ... 10/3` in `CellNoise3D`
568+
/// frequency of `CellNoise3D`; its range is approximately `0 ... 10/3` in `CellNoise3D`
569569
/// units.
570570
public
571571
struct CellNoise3D:_CellNoise3D, HashedNoise

0 commit comments

Comments
 (0)