Skip to content

Commit

Permalink
Merge pull request #22 from tayloraswift/upgrade-ci
Browse files Browse the repository at this point in the history
upgrade CI to Swift 6.0.2, add workflows for Apple devices
  • Loading branch information
tayloraswift authored Nov 14, 2024
2 parents 1e602c2 + bf25fd3 commit cb72b69
Show file tree
Hide file tree
Showing 10 changed files with 181 additions and 77 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/Benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: benchmark

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
benchmark-macos:
runs-on: macos-15
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Homebrew Mac
if: ${{ runner.os == 'Macos' }}
run: |
echo "/opt/homebrew/bin:/usr/local/bin" >> $GITHUB_PATH
brew install jemalloc
- name: Ubuntu deps
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libjemalloc-dev
- name: benchmark
run: |
cd ExternalBenchmarks
swift package benchmark
21 changes: 7 additions & 14 deletions .github/workflows/docs.yml → .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,35 @@ jobs:
- name: Install Swift
uses: tayloraswift/swift-install-action@master
with:
swift-prefix: "swift-5.10.1-release/ubuntu2404/swift-5.10.1-RELEASE"
swift-id: "swift-5.10.1-RELEASE-ubuntu24.04"
swift-prefix: "swift-6.0.2-release/ubuntu2404/swift-6.0.2-RELEASE"
swift-id: "swift-6.0.2-RELEASE-ubuntu24.04"

- name: Install Unidoc
uses: tayloraswift/swift-unidoc-action@master
with:
unidoc-version: "master"

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

- name: Validate documentation
run: |
unidoc compile -I .. \
unidoc compile \
--swift-toolchain $SWIFT_INSTALLATION \
--ci fail-on-errors \
--package-name swift-noise
--project-path .
macos:
runs-on: macos-14
runs-on: macos-15
name: macOS
env:
DEVELOPER_DIR: "/Applications/Xcode_15.3.app/Contents/Developer"

steps:
- name: Install Unidoc
uses: tayloraswift/swift-unidoc-action@master
with:
unidoc-version: "master"

- name: Checkout repository
uses: actions/checkout@v3

- name: Validate documentation
run: |
unidoc compile -I .. \
unidoc compile \
--ci fail-on-errors \
--package-name swift-noise
--project-path .
34 changes: 34 additions & 0 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
linux:
runs-on: ubuntu-24.04
name: Ubuntu 24.04
steps:
- name: Install Swift
uses: tayloraswift/swift-install-action@master
with:
swift-prefix: "swift-6.0.2-release/ubuntu2404/swift-6.0.2-RELEASE"
swift-id: "swift-6.0.2-RELEASE-ubuntu24.04"

- name: Checkout repository
uses: actions/checkout@v3

- name: Run tests
run: Scripts/TestAll

macos:
runs-on: macos-15
name: macOS
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Run tests
run: Scripts/TestAll
58 changes: 0 additions & 58 deletions .github/workflows/build.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/iOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: iOS

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
macos:
runs-on: macos-15
name: macOS
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build
run: |
swift --version
xcrun xcodebuild build -scheme "Noise" -destination \
"generic/platform=ios"
21 changes: 21 additions & 0 deletions .github/workflows/tvOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: tvOS

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
macos:
runs-on: macos-15
name: macOS
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build
run: |
swift --version
xcrun xcodebuild build -scheme "Noise" -destination \
"generic/platform=tvos"
22 changes: 22 additions & 0 deletions .github/workflows/visionOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: visionOS

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
macos:
runs-on: macos-15
name: macOS
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build
run: |
swift --version
xcrun xcodebuild build -scheme "Noise" -destination \
"generic/platform=visionos"
22 changes: 22 additions & 0 deletions .github/workflows/watchOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: watchOS

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
macos:
runs-on: macos-15
name: macOS
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build
run: |
swift --version
xcrun xcodebuild build -scheme "Noise" -destination \
"generic/platform=watchos"
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

***`noise`***<br>`2.0`

[![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)
[![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)

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

</div>

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

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


## Requirements

The swift-noise library requires Swift 5.10 or later.


| Platform | Status |
| -------- | ------ |
| 🐧 Linux | [![Tests](https://github.com/tayloraswift/swift-noise/actions/workflows/Tests.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/Tests.yml) |
| 🍏 Darwin | [![Tests](https://github.com/tayloraswift/swift-noise/actions/workflows/Tests.yml/badge.svg)](https://github.com/tayloraswift/swift-noise/actions/workflows/Tests.yml) |
| 🍏 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) |
| 🍏 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) |
| 🍏 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) |
| 🍏 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) |


[Check deployment minimums](https://swiftinit.org/docs/swift-noise#ss:platform-requirements)


## Building

Build *Noise* with the Swift Package Manager. *Noise* itself has no dependencies, but the tests use
Expand Down
5 changes: 5 additions & 0 deletions Scripts/TestAll
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e
swift --version
swift build -c release --build-tests
swift test -c release --skip-build

0 comments on commit cb72b69

Please sign in to comment.