Update CI (#42)
* Split CI actions into dedicated files * Fix pipelines * Rename pipeline jobs * Update README
This commit is contained in:
parent
0161470415
commit
2aaef3d111
|
|
@ -0,0 +1,39 @@
|
|||
name: Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
linux-test-build-release:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
swift: ["5.1", "latest"]
|
||||
container:
|
||||
image: swift:${{ matrix.swift }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: "Update APT"
|
||||
shell: bash
|
||||
run: "apt update"
|
||||
- name: "Install curl"
|
||||
shell: bash
|
||||
run: "apt-get install -y curl"
|
||||
- name: Swift version
|
||||
run: swift --version
|
||||
- name: Test
|
||||
run: swift test -v --skip-update --parallel --enable-test-discovery --enable-code-coverage
|
||||
- name: Generate coverage report
|
||||
run: llvm-cov export -format="lcov" .build/debug/*PackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
||||
- name: Upload code coverage report
|
||||
uses: codecov/codecov-action@master
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
file: coverage.lcov
|
||||
fail_ci_if_error: true
|
||||
- name: Build Release
|
||||
run: swift build -c release
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
name: macOS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
macos-test-build-release-xcode:
|
||||
runs-on: macOS-latest
|
||||
strategy:
|
||||
matrix:
|
||||
xcode: ["11.7", "12.4"]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Select Xcode ${{ matrix.xcode }}
|
||||
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
|
||||
- name: Test
|
||||
run: swift test -v --skip-update --parallel --enable-test-discovery --enable-code-coverage
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
- name: Generate coverage report
|
||||
run: xcrun llvm-cov export -format="lcov" .build/debug/*PackageTests.xctest/Contents/MacOS/*PackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
||||
- name: Upload code coverage report
|
||||
uses: codecov/codecov-action@master
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
file: coverage.lcov
|
||||
fail_ci_if_error: true
|
||||
- name: Build Release
|
||||
run: swift build -c release
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
name: WASM
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
wasm-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Build
|
||||
uses: swiftwasm/swiftwasm-action@main
|
||||
with:
|
||||
shell-action: swift build --triple wasm32-unknown-wasi
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
name: Windows
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
windows-test-build-release:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
SNAPSHOT: "https://swift.org/builds/swift-5.4.1-release/windows10/swift-5.4.1-RELEASE/swift-5.4.1-RELEASE-windows10.exe"
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: seanmiddleditch/gha-setup-vsdevenv@master
|
||||
|
||||
- name: Install Swift
|
||||
run: |
|
||||
Install-Binary -Url "${env:SNAPSHOT}" -Name "installer.exe" -ArgumentList ("-q")
|
||||
- name: Set Environment Variables
|
||||
run: |
|
||||
echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "DEVELOPER_DIR=C:\Library\Developer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- name: Adjust Paths
|
||||
run: |
|
||||
echo "C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
echo "C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: Install Supporting Files
|
||||
run: |
|
||||
Copy-Item "$env:SDKROOT\usr\share\ucrt.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\ucrt\module.modulemap"
|
||||
Copy-Item "$env:SDKROOT\usr\share\visualc.modulemap" -destination "$env:VCToolsInstallDir\include\module.modulemap"
|
||||
Copy-Item "$env:SDKROOT\usr\share\visualc.apinotes" -destination "$env:VCToolsInstallDir\include\visualc.apinotes"
|
||||
Copy-Item "$env:SDKROOT\usr\share\winsdk.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\um\module.modulemap"
|
||||
- name: Test
|
||||
run: swift test -v --skip-update --parallel --enable-test-discovery
|
||||
- name: Build Release
|
||||
run: swift build -c release
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
macOS:
|
||||
runs-on: macOS-latest
|
||||
strategy:
|
||||
matrix:
|
||||
xcode: ["11.7", "12.2"]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Select Xcode ${{ matrix.xcode }}
|
||||
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
|
||||
- name: Swift version
|
||||
run: swift --version
|
||||
- name: Test
|
||||
run: swift test -v --skip-update --parallel --enable-test-discovery --enable-code-coverage
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
- name: Generate coverage report
|
||||
run: xcrun llvm-cov export -format="lcov" .build/debug/*PackageTests.xctest/Contents/MacOS/*PackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
||||
- name: Upload code coverage report
|
||||
uses: codecov/codecov-action@master
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
file: coverage.lcov
|
||||
fail_ci_if_error: true
|
||||
- name: Build Release
|
||||
run: swift build -c release
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
swift: ["5.1", "latest"]
|
||||
container:
|
||||
image: swift:${{ matrix.swift }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: "Update APT"
|
||||
shell: bash
|
||||
run: "apt update"
|
||||
- name: "Install curl"
|
||||
shell: bash
|
||||
run: "apt-get install -y curl"
|
||||
- name: Swift version
|
||||
run: swift --version
|
||||
- name: Test
|
||||
run: swift test -v --skip-update --parallel --enable-test-discovery --enable-code-coverage
|
||||
- name: Generate coverage report
|
||||
run: llvm-cov export -format="lcov" .build/debug/*PackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
||||
- name: Upload code coverage report
|
||||
uses: codecov/codecov-action@master
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
file: coverage.lcov
|
||||
fail_ci_if_error: true
|
||||
- name: Build Release
|
||||
run: swift build -c release
|
||||
|
||||
|
||||
webAssembly:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Swift version
|
||||
run: swift --version
|
||||
- name: Build
|
||||
uses: swiftwasm/swiftwasm-action@main
|
||||
with:
|
||||
shell-action: swift build --triple wasm32-unknown-wasi
|
||||
|
|
@ -1,11 +1,13 @@
|
|||
# Fireblade ECS (Entity-Component System)
|
||||
[](LICENSE)
|
||||
[](https://github.com/fireblade-engine/ecs/actions?query=workflow%3ACI)
|
||||
[](https://codecov.io/gh/fireblade-engine/ecs)
|
||||
[](https://github.com/fireblade-engine/ecs/actions/workflows/ci-macos.yml)
|
||||
[](https://github.com/fireblade-engine/ecs/actions/workflows/ci-linux.yml)
|
||||
[](https://github.com/fireblade-engine/ecs/actions/workflows/ci-windows.yml)
|
||||
[](https://github.com/fireblade-engine/ecs/actions/workflows/ci-wasm.yml)
|
||||
[](https://github.com/fireblade-engine/ecs/wiki)
|
||||
[](https://codecov.io/gh/fireblade-engine/ecs)
|
||||
[](https://swiftpackageindex.com/fireblade-engine/ecs)
|
||||
[](https://swiftpackageindex.com/fireblade-engine/ecs)
|
||||
[](https://github.com/swiftwasm/swift#swiftwasm)
|
||||
|
||||
This is a **dependency free**, **lightweight**, **fast** and **easy to use** [Entity-Component System](https://en.wikipedia.org/wiki/Entity_component_system) implementation in Swift. It is developed and maintained as part of the [Fireblade Game Engine project](https://github.com/fireblade-engine).
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue