Skip to content

Commit 71bc25e

Browse files
authored
Update CI (#7)
* Update CI * Update README
1 parent 7e41899 commit 71bc25e

6 files changed

Lines changed: 130 additions & 43 deletions

File tree

.github/workflows/ci-linux.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Linux
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
linux-test-build-release:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
swift: ["5.1", "latest"]
15+
container:
16+
image: swift:${{ matrix.swift }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@master
20+
- name: Test
21+
run: make test
22+
- name: Build Release
23+
run: make buildRelease

.github/workflows/ci-macos.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: macOS
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
macos-test-build-release-xcode:
11+
runs-on: macOS-11
12+
strategy:
13+
matrix:
14+
xcode: ["11.7", "12.5.1", "13.0"]
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@master
18+
- name: Select Xcode ${{ matrix.xcode }}
19+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
20+
- name: Test
21+
run: make test
22+
env:
23+
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
24+
- name: Upload test artifacts
25+
if: failure()
26+
uses: actions/upload-artifact@v2.2.3
27+
with:
28+
name: test-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
29+
path: |
30+
.build/**/*.json
31+
.build/**/*.xctest
32+
- name: Build Release
33+
run: make buildRelease
34+
env:
35+
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
36+
- name: Upload build artifacts
37+
if: failure()
38+
uses: actions/upload-artifact@v2.2.3
39+
with:
40+
name: build-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
41+
path: |
42+
*.lcov
43+
.build/*.yaml
44+
.build/**/*.a
45+
.build/**/*.so
46+
.build/**/*.dylib
47+
.build/**/*.dSYM
48+
.build/**/*.json

.github/workflows/ci-wasm.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: WASM
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
wasm-build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Build
15+
uses: swiftwasm/swiftwasm-action@main
16+
with:
17+
shell-action: swift build --triple wasm32-unknown-wasi

.github/workflows/ci-windows.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Windows
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
windows-test-build-release:
11+
runs-on: windows-latest
12+
env:
13+
SNAPSHOT: "https://swift.org/builds/swift-5.4.1-release/windows10/swift-5.4.1-RELEASE/swift-5.4.1-RELEASE-windows10.exe"
14+
steps:
15+
- uses: actions/checkout@master
16+
- uses: seanmiddleditch/gha-setup-vsdevenv@master
17+
18+
- name: Install Swift
19+
run: |
20+
Install-Binary -Url "${env:SNAPSHOT}" -Name "installer.exe" -ArgumentList ("-q")
21+
- name: Set Environment Variables
22+
run: |
23+
echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
24+
echo "DEVELOPER_DIR=C:\Library\Developer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
25+
- name: Adjust Paths
26+
run: |
27+
echo "C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
28+
echo "C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
29+
- name: Install Supporting Files
30+
run: |
31+
Copy-Item "$env:SDKROOT\usr\share\ucrt.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\ucrt\module.modulemap"
32+
Copy-Item "$env:SDKROOT\usr\share\visualc.modulemap" -destination "$env:VCToolsInstallDir\include\module.modulemap"
33+
Copy-Item "$env:SDKROOT\usr\share\visualc.apinotes" -destination "$env:VCToolsInstallDir\include\visualc.apinotes"
34+
Copy-Item "$env:SDKROOT\usr\share\winsdk.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\um\module.modulemap"
35+
- name: Test
36+
run: swift test -v --skip-update --parallel --enable-test-discovery
37+
- name: Build Release
38+
run: swift build -c release

.github/workflows/ci.yml

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

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# FirebladeMath
22

33
[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
4-
[![github CI](https://github.com/fireblade-engine/math/workflows/CI/badge.svg)](https://github.com/fireblade-engine/math/actions?query=workflow%3ACI)
4+
[![macOS](https://github.com/fireblade-engine/math/actions/workflows/ci-macos.yml/badge.svg)](https://github.com/fireblade-engine/math/actions/workflows/ci-macos.yml)
5+
[![Linux](https://github.com/fireblade-engine/math/actions/workflows/ci-linux.yml/badge.svg)](https://github.com/fireblade-engine/math/actions/workflows/ci-linux.yml)
6+
[![Windows](https://github.com/fireblade-engine/math/actions/workflows/ci-windows.yml/badge.svg)](https://github.com/fireblade-engine/math/actions/workflows/ci-windows.yml)
7+
[![WASM](https://github.com/fireblade-engine/math/actions/workflows/ci-wasm.yml/badge.svg)](https://github.com/fireblade-engine/math/actions/workflows/ci-wasm.yml)
58
[![swift-version-compatibility](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Ffireblade-engine%2Fmath%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/fireblade-engine/math)
69
[![platform-compatilibilty](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Ffireblade-engine%2Fmath%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/fireblade-engine/math)
710
<!--[![platform-webassembly](https://img.shields.io/badge/Platform-WebAssembly-blue.svg)](https://github.com/swiftwasm/swift#swiftwasm)-->

0 commit comments

Comments
 (0)