Skip to content

Commit cb72b69

Browse files
authored
Merge pull request #22 from tayloraswift/upgrade-ci
upgrade CI to Swift 6.0.2, add workflows for Apple devices
2 parents 1e602c2 + bf25fd3 commit cb72b69

File tree

10 files changed

+181
-77
lines changed

10 files changed

+181
-77
lines changed

.github/workflows/Benchmarks.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: benchmark
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
benchmark-macos:
11+
runs-on: macos-15
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Homebrew Mac
17+
if: ${{ runner.os == 'Macos' }}
18+
run: |
19+
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
20+
brew install jemalloc
21+
- name: Ubuntu deps
22+
if: ${{ runner.os == 'Linux' }}
23+
run: |
24+
sudo apt-get install -y libjemalloc-dev
25+
- name: benchmark
26+
run: |
27+
cd ExternalBenchmarks
28+
swift package benchmark

.github/workflows/docs.yml renamed to .github/workflows/Documentation.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,35 @@ jobs:
1818
- name: Install Swift
1919
uses: tayloraswift/swift-install-action@master
2020
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"
21+
swift-prefix: "swift-6.0.2-release/ubuntu2404/swift-6.0.2-RELEASE"
22+
swift-id: "swift-6.0.2-RELEASE-ubuntu24.04"
2323

2424
- name: Install Unidoc
2525
uses: tayloraswift/swift-unidoc-action@master
26-
with:
27-
unidoc-version: "master"
2826

2927
# This clobbers everything in the current directory!
3028
- name: Checkout repository
3129
uses: actions/checkout@v3
3230

3331
- name: Validate documentation
3432
run: |
35-
unidoc compile -I .. \
33+
unidoc compile \
3634
--swift-toolchain $SWIFT_INSTALLATION \
3735
--ci fail-on-errors \
38-
--package-name swift-noise
36+
--project-path .
3937
4038
macos:
41-
runs-on: macos-14
39+
runs-on: macos-15
4240
name: macOS
43-
env:
44-
DEVELOPER_DIR: "/Applications/Xcode_15.3.app/Contents/Developer"
45-
4641
steps:
4742
- name: Install Unidoc
4843
uses: tayloraswift/swift-unidoc-action@master
49-
with:
50-
unidoc-version: "master"
5144

5245
- name: Checkout repository
5346
uses: actions/checkout@v3
5447

5548
- name: Validate documentation
5649
run: |
57-
unidoc compile -I .. \
50+
unidoc compile \
5851
--ci fail-on-errors \
59-
--package-name swift-noise
52+
--project-path .

.github/workflows/Tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
linux:
11+
runs-on: ubuntu-24.04
12+
name: Ubuntu 24.04
13+
steps:
14+
- name: Install Swift
15+
uses: tayloraswift/swift-install-action@master
16+
with:
17+
swift-prefix: "swift-6.0.2-release/ubuntu2404/swift-6.0.2-RELEASE"
18+
swift-id: "swift-6.0.2-RELEASE-ubuntu24.04"
19+
20+
- name: Checkout repository
21+
uses: actions/checkout@v3
22+
23+
- name: Run tests
24+
run: Scripts/TestAll
25+
26+
macos:
27+
runs-on: macos-15
28+
name: macOS
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v3
32+
33+
- name: Run tests
34+
run: Scripts/TestAll

.github/workflows/build.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/iOS.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: iOS
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
macos:
11+
runs-on: macos-15
12+
name: macOS
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Build
18+
run: |
19+
swift --version
20+
xcrun xcodebuild build -scheme "Noise" -destination \
21+
"generic/platform=ios"

.github/workflows/tvOS.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: tvOS
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
macos:
11+
runs-on: macos-15
12+
name: macOS
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Build
18+
run: |
19+
swift --version
20+
xcrun xcodebuild build -scheme "Noise" -destination \
21+
"generic/platform=tvos"

.github/workflows/visionOS.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: visionOS
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
macos:
11+
runs-on: macos-15
12+
name: macOS
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Build
18+
run: |
19+
swift --version
20+
xcrun xcodebuild build -scheme "Noise" -destination \
21+
"generic/platform=visionos"
22+

.github/workflows/watchOS.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: watchOS
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
macos:
11+
runs-on: macos-15
12+
name: macOS
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Build
18+
run: |
19+
swift --version
20+
xcrun xcodebuild build -scheme "Noise" -destination \
21+
"generic/platform=watchos"
22+

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
***`noise`***<br>`2.0`
44

5-
[![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-
8-
[![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)
9-
[![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)
5+
[![Tests](https://github.com/tayloraswift/swift-noise/actions/workflows/Tests.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/Tests.yml)
6+
[![Documentation](https://github.com/tayloraswift/swift-noise/actions/workflows/Documentation.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/Documentation.yml)
107

118
</div>
129

@@ -20,6 +17,25 @@ All popular types of procedural noise are supported, including three [gradient n
2017

2118
`swift-noise`’s entire public API is [documented](https://swiftinit.org/docs/swift-noise/noise).
2219

20+
21+
## Requirements
22+
23+
The swift-noise library requires Swift 5.10 or later.
24+
25+
26+
| Platform | Status |
27+
| -------- | ------ |
28+
| 🐧 Linux | [![Tests](https://github.com/tayloraswift/swift-noise/actions/workflows/Tests.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/Tests.yml) |
29+
| 🍏 Darwin | [![Tests](https://github.com/tayloraswift/swift-noise/actions/workflows/Tests.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/Tests.yml) |
30+
| 🍏 Darwin (iOS) | [![iOS](https://github.com/tayloraswift/swift-noise/actions/workflows/iOS.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/iOS.yml) |
31+
| 🍏 Darwin (tvOS) | [![tvOS](https://github.com/tayloraswift/swift-noise/actions/workflows/tvOS.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/tvOS.yml) |
32+
| 🍏 Darwin (visionOS) | [![visionOS](https://github.com/tayloraswift/swift-noise/actions/workflows/visionOS.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/visionOS.yml) |
33+
| 🍏 Darwin (watchOS) | [![watchOS](https://github.com/tayloraswift/swift-noise/actions/workflows/watchOS.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/watchOS.yml) |
34+
35+
36+
[Check deployment minimums](https://swiftinit.org/docs/swift-noise#ss:platform-requirements)
37+
38+
2339
## Building
2440

2541
Build *Noise* with the Swift Package Manager. *Noise* itself has no dependencies, but the tests use

Scripts/TestAll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
set -e
3+
swift --version
4+
swift build -c release --build-tests
5+
swift test -c release --skip-build

0 commit comments

Comments
 (0)