-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.31 KB
/
Copy pathci.yml
File metadata and controls
48 lines (38 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: CI Workflow
# Trigger the workflow on push and pull request events
on:
push:
pull_request:
# Define the jobs to run in the workflow
jobs:
build-and-test:
runs-on: macos-latest # Use macOS for Swift and iOS-specific dependencies
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9' # Specify your required Python version
- name: Set up Swift
run: |
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run build script
run: |
chmod +x build.sh
./build.sh
- name: Run tests
run: |
pytest
- name: Commit and push the generated .dylib file
run: |
git config --local user.name "GitHub Action"
git config --local user.email "action@github.com"
git add ./loop_to_python_api/libLoopAlgorithmToPython.dylib
git commit -m "Add generated libLoopAlgorithmToPython.dylib"
git push origin HEAD:${{ github.ref }}