Add missing devcontainer specification #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build and test | |
"on": | |
push: | |
branches: [main, rewrite] | |
paths-ignore: | |
- "Docs/**" | |
- "**.md" | |
- "README.md" | |
- "LICENSE" | |
- ".gitignore" | |
pull_request: | |
branches: ["**"] | |
paths-ignore: | |
- "Docs/**" | |
- "**.md" | |
- "README.md" | |
- "LICENSE" | |
- ".gitignore" | |
jobs: | |
devcontainer: | |
name: "Devcontainer: ${{ matrix.os }}/${{ matrix.configuration }}" | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
configuration: [debug] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build and Test | |
uses: devcontainers/ci@v0.3 | |
with: | |
runCmd: swift test -c ${{ matrix.configuration }} | |
native: | |
name: "Native: ${{ matrix.os }}/${{ matrix.configuration }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
configuration: [debug] | |
include: | |
# Default values to add | |
- shell: 'bash -eo pipefail {0}' | |
- build-options: '--explicit-target-dependency-import-check=error' | |
# Overrides for the defaults | |
- shell: pwsh | |
os: windows-latest | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Swift (Unices) | |
if: ${{ matrix.os != 'windows-latest' }} | |
uses: 'swift-actions/setup-swift@v1' | |
with: | |
version: 5.9 | |
- name: Setup Swift (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
uses: 'compnerd/gha-setup-swift@main' | |
with: | |
github-repo: thebrowsercompany/swift-build | |
release-asset-name: installer-amd64.exe | |
release-tag-name: 20231010.3 | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Test (${{ matrix.configuration }}) | |
run: > | |
swift test -c ${{ matrix.configuration }} ${{ matrix.build-options }} | |
--explicit-target-dependency-import-check=error | |
- name: Test non-reentrant build (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
swift package clean | |
$env:SPM_BUILD_TOOL_SUPPORT_NO_REENTRANT_BUILD=1 | |
swift build -c ${{ matrix.configuration }} ${{ matrix.build-options }} --product GenerateResource | |
swift test -c ${{ matrix.configuration }} ${{ matrix.build-options }} |