Skip to content

Commit a39bf6a

Browse files
authored
Merge pull request #2 from RbBtSn0w/copilot/optimize-project-for-opensource
Document GitHub Actions workflow approval requirements and configuration
2 parents 146b5cf + 5fbc476 commit a39bf6a

File tree

57 files changed

+932
-954
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+932
-954
lines changed

.github/workflows/ci.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
branches: [ master, develop ]
9+
10+
# 允许 CI 自动运行,且在某些情况下推送回仓库(可选)
11+
permissions:
12+
contents: read
13+
checks: write
14+
pull-requests: write
15+
16+
jobs:
17+
spm-check:
18+
name: SPM Check
19+
runs-on: macos-14
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Select Xcode
25+
uses: maxim-lobanov/setup-xcode@v1
26+
with:
27+
xcode-version: '15.2'
28+
29+
- name: Validate SPM Mode
30+
run: |
31+
SDK_PATH=$(xcrun --sdk iphonesimulator --show-sdk-path)
32+
TARGET="arm64-apple-ios15.0-simulator"
33+
swift build -Xswiftc "-sdk" -Xswiftc "$SDK_PATH" -Xswiftc "-target" -Xswiftc "$TARGET" -Xcc "-isysroot" -Xcc "$SDK_PATH" -Xcc "-target" -Xcc "$TARGET"
34+
35+
tuist-check:
36+
name: Tuist Check
37+
runs-on: macos-14
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
42+
- name: Install Mise
43+
uses: jdx/mise-action@v2
44+
with:
45+
version: 2024.1.0
46+
47+
- name: Select Xcode
48+
uses: maxim-lobanov/setup-xcode@v1
49+
with:
50+
xcode-version: '15.2'
51+
52+
- name: Generate Project
53+
run: |
54+
tuist install
55+
tuist generate
56+
57+
- name: Build Framework
58+
run: |
59+
set -o pipefail
60+
xcodebuild build \
61+
-scheme RBSOdometer \
62+
-destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' \
63+
-configuration Debug \
64+
CODE_SIGN_IDENTITY="" \
65+
CODE_SIGNING_REQUIRED=NO \
66+
| tee build.log
67+
68+
- name: Run Tests
69+
run: |
70+
set -o pipefail
71+
xcodebuild test \
72+
-scheme RBSOdometerTests \
73+
-destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' \
74+
-configuration Debug \
75+
-enableCodeCoverage YES \
76+
CODE_SIGN_IDENTITY="" \
77+
CODE_SIGNING_REQUIRED=NO \
78+
| tee test.log
79+
80+
- name: Build Example App
81+
run: |
82+
set -o pipefail
83+
xcodebuild build \
84+
-scheme RBSOdometerExample \
85+
-destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' \
86+
-configuration Debug \
87+
CODE_SIGN_IDENTITY="" \
88+
CODE_SIGNING_REQUIRED=NO \
89+
| tee example.log
90+
91+
- name: Upload Coverage
92+
if: success()
93+
uses: codecov/codecov-action@v4
94+
with:
95+
files: ./coverage.xml
96+
flags: unittests
97+
name: codecov-umbrella
98+
fail_ci_if_error: false
99+
100+

.gitignore

Lines changed: 22 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# Xcode
2-
#
3-
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4-
5-
## Build generated
62
build/
73
DerivedData/
8-
9-
## Various settings
104
*.pbxuser
115
!default.pbxuser
126
*.mode1v3
@@ -16,48 +10,33 @@ DerivedData/
1610
*.perspectivev3
1711
!default.perspectivev3
1812
xcuserdata/
19-
20-
## Other
2113
*.moved-aside
2214
*.xccheckout
2315
*.xcscmblueprint
24-
25-
## Obj-C/Swift specific
2616
*.hmap
2717
*.ipa
2818
*.dSYM.zip
2919
*.dSYM
3020

31-
# CocoaPods
32-
#
33-
# We recommend against adding the Pods directory to your .gitignore. However
34-
# you should judge for yourself, the pros and cons are mentioned at:
35-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
36-
#
37-
# Pods/
38-
39-
# Carthage
40-
#
41-
# Add this line if you want to avoid checking in source code from Carthage dependencies.
42-
# Carthage/Checkouts
43-
44-
Carthage/Build
45-
46-
# fastlane
47-
#
48-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
49-
# screenshots whenever they are needed.
50-
# For more information about the recommended setup visit:
51-
# https://docs.fastlane.tools/best-practices/source-control/#source-control
52-
53-
fastlane/report.xml
54-
fastlane/Preview.html
55-
fastlane/screenshots
56-
fastlane/test_output
57-
58-
# Code Injection
59-
#
60-
# After new code Injection tools there's a generated folder /iOSInjectionProject
61-
# https://github.com/johnno1962/injectionforxcode
62-
63-
iOSInjectionProject/
21+
# Tuist
22+
# 我们忽略生成的项目文件,因为它们可以通过 `tuist generate` 随时生成
23+
*.xcodeproj
24+
*.xcworkspace
25+
# 排除 Tuist 缓存和生成的依赖
26+
Tuist/Dependencies/
27+
Derived/
28+
.tuist-bin/
29+
graph.dot
30+
31+
# Swift Package Manager
32+
# 忽略 SPM 的构建目录和获取的依赖
33+
.build/
34+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
35+
.swiftpm/configuration/
36+
37+
# Sweetpad & Sourcekit-LSP
38+
# 忽略 LSP 服务器生成的配置文件
39+
buildServer.json
40+
41+
# OS X
42+
.DS_Store

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tuist 4.0.0

.travis.yml

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

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Changelog
2+
3+
All notable changes to RBSOdometer will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- Migrated from CocoaPods to Tuist for modern project management
12+
- GitHub Actions CI/CD workflows for automated building and testing
13+
- Automated release workflow with XCFramework generation
14+
- Comprehensive CONTRIBUTING.md guide
15+
- CHANGELOG.md for tracking changes
16+
- Enhanced README with detailed usage examples and Tuist setup instructions
17+
- Code coverage reporting support
18+
19+
### Changed
20+
- Updated minimum iOS deployment target from 7.0 to 11.0
21+
- Migrated from Travis CI to GitHub Actions
22+
- Updated project badges to reflect new CI system
23+
- Improved documentation with better examples and API references
24+
25+
### Removed
26+
- Deprecated Travis CI configuration
27+
- CocoaPods-specific workflow files
28+
29+
## [0.2.0] - 2018
30+
31+
### Added
32+
- Initial release of RBSOdometer
33+
- Smooth number transition animations
34+
- Customizable animation duration and density
35+
- Support for custom text color and font
36+
- Auto Layout support
37+
- Integration with RBSReuseQueue for efficient view reuse
38+
- Example project demonstrating usage
39+
- MIT License
40+
- Basic documentation
41+
42+
[Unreleased]: https://github.com/RbBtSn0w/RBSOdometer/compare/v0.2.0...HEAD
43+
[0.2.0]: https://github.com/RbBtSn0w/RBSOdometer/releases/tag/0.2.0

0 commit comments

Comments
 (0)