You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for running on Linux as well as macOS (#1)
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Workflow and CI
* Update README
* Update README
* Update README
* Update README
* Update README
* Update README and cleanup script
* Fix copy-files handling
* Update README
The following configuration options can be passed to the workflow. For example, to specify the version of Swift you want to use for building and testing, you can use the `swift-version` parameter like so:
51
+
52
+
```yml
53
+
jobs:
54
+
linux-android:
55
+
runs-on: ubuntu-latest
56
+
steps:
57
+
- uses: actions/checkout@v4
58
+
- name: "Test Swift Package on Linux"
59
+
run: swift test
60
+
- name: "Test Swift Package on Android"
61
+
uses: skiptools/swift-android-action@v2
62
+
with:
63
+
swift-version: 6.0.2
64
+
```
65
+
66
+
### Configuration Options
67
+
68
+
| Parameter | Default | Description |
69
+
|-----|-----|-----|
70
+
| swift-version | The version of the Swift toolchain to use | 6.0.2 |
71
+
| package-path | The folder where the swift package is checked out | . |
72
+
| swift-build-flags | Additional flags to pass to the swift build command | |
73
+
| swift-test-flags | Additional flags to pass to the swift test command | |
74
+
| build-tests | Whether to build the package tests or just the sources | true |
75
+
| run-tests | Whether to run the tests or just perform the build | true |
76
+
| copy-files | Additional files to copy to emulator for testing | |
77
+
| android-api-level | The API level of the Android emulator to run against | 29 |
78
+
| android-emulator-options | Options to pass to the Android emulator | -no-window … |
This action can be run on any of the GitHub `ubuntu-*` and `macos-*` [runner images](https://github.com/actions/runner-images). However, due to the inability of macOS on ARM to run nested virtualization ([issue](https://github.com/ReactiveCircus/android-emulator-runner/issues/350)), the Android emulator cannot be run on these platforms, and so running on any macOS image that uses ARM (including `macos-14` and `macos-15`) requires disabling tests with `run-tests: false`. Running tests are supported on `macos-13`, as well as the large Intel macOS images like `macos-14-large` and `macos-15-large`.
84
+
85
+
## Complete Universal CI Example
86
+
87
+
Following is an example of a `ci.yml` workflow that checks out and tests a Swift package on each of macOS, iOS, Linux, Android, and Windows.
0 commit comments