Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
# By JP Simard (3) and others
# Via GitHub
* upstream/main:
  Require Swift 5.7 or later (jpsim#424)
  Add empty changelog section
  Release 5.1.3
  add support for riscv64 (jpsim#419)
  Add support for Android (jpsim#421)
  GitHub Actions workflow fixes (jpsim#422)
  add os(visionOS) support (jpsim#418)
  Bazel: support rules_swift 2.x (jpsim#420)
  Bump rexml from 3.2.5 to 3.2.8

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
tejassharma96 committed Jul 10, 2024
2 parents e1dd181 + 53d8b3b commit 332e67c
Show file tree
Hide file tree
Showing 25 changed files with 217 additions and 302 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
- '**/BUILD'
- 'MODULE.bazel'
- 'WORKSPACE'
- '.bazelrc'
- '.bazelversion'
Expand All @@ -21,26 +22,31 @@ on:
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
- '**/BUILD'
- 'MODULE.bazel'
- 'WORKSPACE'
- '.bazelrc'
- '.bazelversion'

concurrency:
group: bazel-${{ github.ref }}
cancel-in-progress: true

jobs:
MacOS:
runs-on: macos-13
macOS:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Apple tests
run: bazelisk test //Tests/...
Linux:
strategy:
matrix:
tag: ['5.4', '5.5', '5.6', '5.7', '5.8', '5.9', '5.10']
tag: ['5.7', '5.8', '5.9', '5.10']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}-focal
steps:
- uses: actions/checkout@v3
- uses: bazelbuild/setup-bazelisk@v2
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v3
- name: Yams tests
run: bazel test --test_output=all //Tests:UnitTests
23 changes: 15 additions & 8 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CMake
on:
push:
branches: [main]
paths:
paths:
- '.github/workflows/cmake.yml'
- '**/CMakeLists.txt'
- '**/*.cmake'
Expand All @@ -12,7 +12,7 @@ on:
- 'Sources/**/*.swift'
- 'Sources/**/module.modulemap'
pull_request:
paths:
paths:
- '.github/workflows/cmake.yml'
- '**/CMakeLists.txt'
- '**/*.cmake'
Expand All @@ -21,33 +21,40 @@ on:
- 'Sources/**/*.swift'
- 'Sources/**/module.modulemap'

concurrency:
group: cmake-${{ github.ref }}
cancel-in-progress: true

jobs:
CMake:
name: macOS with Xcode ${{ matrix.xcode_version }}
strategy:
matrix:
xcode_version: ['14.2', '14.3', '15.0']
runs-on: macos-13
xcode_version: ['15.0', '15.4']
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: sudo chown runner:admin /usr/local
- run: brew install cmake ninja
- run: swift -version
- run: rm -rf build
- run: cmake -B build -G Ninja -S . -DCMAKE_BUILD_TYPE=Release
- run: cmake --build build
- run: cmake --build build --target install
- run: file /usr/local/lib/swift/macosx/libYams.dylib | grep "Mach-O 64-bit dynamically linked shared library x86_64"
- run: file /usr/local/lib/swift/macosx/libYams.dylib | grep "Mach-O 64-bit dynamically linked shared library arm64"

CMake_Linux:
name: Linux with Swift ${{ matrix.tag }}
strategy:
matrix:
tag: ['5.6', '5.7', '5.8', '5.9', '5.10']
tag: ['5.7', '5.8', '5.9', '5.10']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: apt-get update && apt-get install -y ninja-build curl
- run: curl -L https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-linux-x86_64.tar.gz | tar xz --strip-components=1 -C /usr
- run: swift -version
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/jazzy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Jazzy
on:
push:
branches: [main]
paths:
paths:
- '.github/workflows/jazzy.yml'
- '.jazzy.yaml'
- '**/*.md'
Expand All @@ -12,7 +12,7 @@ on:
- 'Package*'
- 'Sources/**/*.swift'
pull_request:
paths:
paths:
- '.github/workflows/jazzy.yml'
- '.jazzy.yaml'
- '**/*.md'
Expand All @@ -21,21 +21,25 @@ on:
- 'Package*'
- 'Sources/**/*.swift'

concurrency:
group: jazzy-${{ github.ref }}
cancel-in-progress: true

jobs:
Jazzy:
runs-on: macos-13
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.0.app
DEVELOPER_DIR: /Applications/Xcode_15.4.app
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install SourceKitten
run: brew install sourcekitten
- run: swift build
- name: Generate documentation json
run: sourcekitten doc --spm --module-name Yams > yams.json
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.5
ruby-version: 3.3.3
bundler-cache: true
- name: Run jazzy
run: bundle exec jazzy --clean --sourcekitten-sourcefile yams.json
Expand All @@ -47,7 +51,7 @@ jobs:
exit 1
fi
- name: Upload Artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: API Docs
path: docs
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Nightly
on:
push:
branches: [main]
paths:
paths:
- '.github/workflows/nightly.yml'
- 'Package*'
- 'Sources/**/*.[ch]'
Expand All @@ -12,7 +12,7 @@ on:
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
pull_request:
paths:
paths:
- '.github/workflows/nightly.yml'
- 'Package*'
- 'Sources/**/*.[ch]'
Expand All @@ -23,13 +23,17 @@ on:
schedule:
- cron: '0 4 * * *'

concurrency:
group: nightly-${{ github.ref }}
cancel-in-progress: true

jobs:
Nightly:
runs-on: ubuntu-latest
container:
image: swiftlang/swift:nightly
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: swift --version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
14 changes: 9 additions & 5 deletions .github/workflows/pod_lib_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,31 @@ name: pod lib lint
on:
push:
branches: [main]
paths:
paths:
- '.github/workflows/pod_lib_lint.yml'
- '*.podspec'
- 'Gemfile*'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
pull_request:
paths:
paths:
- '.github/workflows/pod_lib_lint.yml'
- '*.podspec'
- 'Gemfile*'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'

concurrency:
group: pod-lib-lint-${{ github.ref }}
cancel-in-progress: true

jobs:
pod_lib_lint:
name: pod lib lint
runs-on: macos-13
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.app
DEVELOPER_DIR: /Applications/Xcode_15.4.app
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: bundle install --path vendor/bundle
- run: bundle exec pod lib lint --verbose
6 changes: 5 additions & 1 deletion .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ on:
- '.swiftlint.yml'
- '**/*.swift'

concurrency:
group: swiftlint-${{ github.ref }}
cancel-in-progress: true

jobs:
SwiftLint:
runs-on: ubuntu-latest
container:
image: ghcr.io/realm/swiftlint:0.54.0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: SwiftLint
run: swiftlint lint --strict
12 changes: 8 additions & 4 deletions .github/workflows/swiftlint_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: SwiftLint Analyze
on:
push:
branches: [main]
paths:
paths:
- '.github/workflows/swiftlint_analyze.yml'
- 'Yams.xcodeproj/**'
- 'Sources/**/*.[ch]'
Expand All @@ -19,13 +19,17 @@ on:
- 'Tests/**/*.swift'
- '!Tests/LinuxMain.swift'

concurrency:
group: swiftlint-analyze-${{ github.ref }}
cancel-in-progress: true

jobs:
Analyze:
runs-on: macos-13
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.0.app
DEVELOPER_DIR: /Applications/Xcode_15.4.app
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Generate xcodebuild.log
run: xcodebuild -sdk macosx -scheme Yams -project Yams.xcodeproj clean build-for-testing > xcodebuild.log
shell: bash
Expand Down
59 changes: 23 additions & 36 deletions .github/workflows/swiftpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,47 +23,40 @@ on:
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'

jobs:
Xcode:
strategy:
matrix:
xcode_version: ['12.5.1', '13.0', '13.1', '13.2.1']
runs-on: macos-11
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v3
- run: swift -version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
concurrency:
group: swiftpm-${{ github.ref }}
cancel-in-progress: true

Xcode_Monterey:
jobs:
Xcode_Ventura:
name: macOS 13 with Xcode ${{ matrix.xcode_version }}
strategy:
matrix:
xcode_version: ['13.3.1', '13.4', '14.0.1', '14.1', '14.2']
runs-on: macos-12
xcode_version: ['14.3', '15.0']
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: swift -version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel

Xcode_Ventura:
Xcode_Sonoma:
name: macOS 14 with Xcode ${{ matrix.xcode_version }}
strategy:
matrix:
xcode_version: ['14.3', '15.0']
runs-on: macos-13
xcode_version: ['15.4']
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: swift -version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
- name: Code Coverage
if: matrix.xcode_version == '15.0'
if: matrix.xcode_version == '15.4'
run: |
swift test --enable-code-coverage
xcrun llvm-cov export -format="lcov" .build/debug/YamsPackageTests.xctest/Contents/MacOS/YamsPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
Expand All @@ -73,36 +66,30 @@ jobs:
env: { 'CODECOV_TOKEN': '${{ secrets.CODECOV_TOKEN }}' }

Linux:
name: Linux with Swift ${{ matrix.tag }}
strategy:
matrix:
tag: ['5.4', '5.5', '5.6', '5.7', '5.8', '5.9', '5.10']
tag: ['5.7', '5.8', '5.9', '5.10']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel

Windows:
name: Windows with Swift ${{ matrix.swift_version }}
runs-on: windows-latest

strategy:
matrix:
include:
- branch: swift-5.6.3-release
tag: 5.6.3-RELEASE
- branch: swift-5.7.2-release
tag: 5.7.2-RELEASE
- branch: development
tag: DEVELOPMENT-SNAPSHOT-2021-11-20-a

swift_version: ['5.7.3', '5.8.1', '5.9.1', '5.10.1']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: compnerd/gha-setup-swift@main
with:
branch: ${{ matrix.branch }}
tag: ${{ matrix.tag }}
branch: swift-${{ matrix.swift_version }}-release
tag: ${{ matrix.swift_version }}-RELEASE
# Commands to run once connected via SSH:
#
# >d:
Expand Down
Loading

0 comments on commit 332e67c

Please sign in to comment.