Skip to content

Commit

Permalink
(chore): Rework github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
N3v1 committed Oct 25, 2024
1 parent 061f381 commit 3f370cc
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 217 deletions.
46 changes: 30 additions & 16 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. -->

### Description
### Overview

<!--- REQUIRED: Describe what changed in detail -->
<!--- REQUIRED: Provide a brief summary of what this PR does and its purpose. -->

### Related issues
### Implementation Details

<!--- REQUIRED: Describe the changes made in the implementation. Highlight any key decisions or trade-offs. -->

### Related Issues

<!--- REQUIRED: Tag all related issues (e.g. * #123) -->
<!--- If this PR resolves the issue please specify (e.g. * closes #123) -->
<!--- If this PR addresses multiple issues, these issues must be related to one other -->
<!--- If this PR resolves an issue, please specify (e.g. * closes #123) -->
<!--- If this PR addresses multiple issues, these issues must be related to one another. -->

* Related Issues:
- * #ISSUE_NUMBER

* #ISSUE_NUMBER
### Testing

<!--- REQUIRED: Describe how you tested your changes. Include any relevant test cases or scenarios. -->

### Checklist

<!--- Add things that are not yet implemented above -->
<!--- Please ensure the following are completed before submitting your PR: -->

- [ ] I read and understood the [contributing guide](https://github.com/ScribbleLabApp/ScribbleLab/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/ScribbleLabApp/ScribbleLab/blob/main/CODE_OF_CONDUCT.md)
- [ ] The issues this PR addresses are related to each other
- [ ] My changes generate no new warnings
- [ ] My code builds and runs on my machine
- [ ] My changes are all related to the related issue above
- [ ] I documented my code
- [ ] I fixed all my swiftlint warnings
- [ ] I have read and understood the [contributing guide](https://github.com/ScribbleLabApp/ScribbleLab/blob/main/CONTRIBUTING.md) and the [code of conduct](https://github.com/ScribbleLabApp/ScribbleLab/blob/main/CODE_OF_CONDUCT.md).
- [ ] The issues this PR addresses are related to one another.
- [ ] My changes generate no new warnings.
- [ ] My code builds and runs on my machine without errors.
- [ ] I have documented my code where applicable.
- [ ] I have added tests to cover my changes, if applicable.
- [ ] All existing tests pass.
- [ ] I have fixed all SwiftLint warnings.

### Screenshots

<!--- REQUIRED: if issue is UI related -->
<!--- OPTIONAL: If this issue is UI-related, include before and after screenshots or mockups. -->

### Additional Notes

<!--- OPTIONAL: Include any other information that may be relevant to the PR. For example, potential impacts, known issues, or future considerations. -->

<!--- IMPORTANT: Fill out all required fields. Otherwise we might close this PR temporarily -->
<!--- IMPORTANT: Fill out all required fields. Otherwise, we might close this PR temporarily. -->
67 changes: 0 additions & 67 deletions .github/workflows/CI-ScribbleLab.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/CI-bumb-build-number.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Greetings
name: Autoresponder

on: [pull_request_target, issues]

Expand All @@ -12,5 +12,5 @@ jobs:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hi there, Thank you for reporting this issue - @N3v1 will look into it. To make communication even better join our Discord Community [here]() `(not available yet)`."
pr-message: "Hi there, Thank you for creating this PR - @N3v1 will look into it. To make communication even better join our Discord Community [here]() `(not available yet)."
issue-message: "Hi there, Thank you for reporting this issue - Our maintainers and interns will soon respond. To make communication even better join our Discord Community [here](https://discord.gg/Y5mUJbNC8h)."
pr-message: "Hi there, Thank you for creating this PR - Our maintainers and interns will soon respond. To make communication even better join our Discord Community [here](https://discord.gg/Y5mUJbNC8h)."
45 changes: 45 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build & Test ScribbleLab

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: macos-latest

strategy:
matrix:
os: [macOS, iOS]
configuration: [Alpha, Beta, Debug, Release]

steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_16.app/Contents/Developer

- name: Install dependencies
run: |
swift package update
- name: Build project using Matrix build system
run: |
if [ "${{ matrix.os }}" == "iOS" ]; then
xcodebuild -scheme ScribbleLab -configuration ${{ matrix.configuration }} build
else
xcodebuild -scheme ScribbleLab -configuration ${{ matrix.configuration }} build
fi
- name: Run Tests
run: |
if [ "${{ matrix.os }}" == "iOS" ]; then
xcodebuild test -scheme ScribbleLab -configuration ${{ matrix.configuration }}
else
xcodebuild test -scheme ScribbleLab -configuration ${{ matrix.configuration }}
fi
46 changes: 46 additions & 0 deletions .github/workflows/compile_gyb_sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Compile gyb sources

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
compile_gyb_sources:
runs-on: macOS-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run generate_sources.sh
run: |
chmod +x ./Utilities/generate_sources.sh
./Utilities/generate_sources.sh
- name: Check for changes
id: check_changes
run: |
git diff --quiet || echo "Change detected"
- name: Commit and push changes
if: steps.check_changes.outputs.changed == 'true'
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add .
git commit -m "(automated/ci): Generate missing swift.gyb Sources"
git push origin HEAD:automated-update-sourcefile-generation
- name: Install GitHub CLI on macOS
run: |
brew install gh
- name: Create Pull Request
if: steps.check_changes.outputs.changed == 'true'
run: |
gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
gh pr create --title "Automated compiling of gyb sources" \
--body "This pull request includes newly generated sources after running the gyb compilation." \
--base main \
--head automated-update-sourcefile-generation \
--repo ${{ github.repository }}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Update SPM
name: Update Dependencies

on:
schedule:
- cron: '0 0 */2 * *' # Run every 2 days
- cron: '0 0 */2 * *'
workflow_dispatch:

jobs:
update-dependencies:
runs-on: macos-14
runs-on: macos-latest

steps:
- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app/Contents/Developer
run: sudo xcode-select -switch /Applications/Xcode_16.app/Contents/Developer

- name: Delete DerivedData directory
run: rm -rf ~/Library/Developer/Xcode/DerivedData
Expand All @@ -36,7 +36,7 @@ jobs:
git config --local user.name "GitHub Actions"
git checkout -b auto-update-dependencies
git add .
git commit -m "Auto-update dependencies"
git commit -m "(chore/ci): Auto-update dependencies"
git push origin auto-update-dependencies
- name: Create Pull Request
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/lint.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/publish-pages.yml

This file was deleted.

Loading

0 comments on commit 3f370cc

Please sign in to comment.