|
1 | 1 | name: OpenDocumentReader-iOS |
2 | | -on: [push] |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - main |
| 8 | + pull_request: |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 12 | + cancel-in-progress: true |
3 | 13 |
|
4 | 14 | jobs: |
5 | 15 | test: |
6 | | - name: test |
7 | | - runs-on: macos-11 |
| 16 | + runs-on: macos-14 |
8 | 17 | steps: |
9 | 18 | - name: checkout |
10 | | - uses: actions/checkout@v2 |
| 19 | + uses: actions/checkout@v4 |
| 20 | + |
| 21 | + - uses: actions/setup-python@v5 |
| 22 | + with: |
| 23 | + python-version: "3.10" |
11 | 24 |
|
12 | | - - name: pods |
| 25 | + - uses: maxim-lobanov/setup-xcode@v1 |
| 26 | + with: |
| 27 | + xcode-version: "15.4" |
| 28 | + |
| 29 | + - name: install pods |
13 | 30 | run: pod install |
14 | 31 |
|
15 | 32 | # https://stackoverflow.com/a/57758679/198996 |
16 | | - - name: bundler |
| 33 | + - name: install bundler |
17 | 34 | run: gem install bundler:1.17.3 |
18 | | - - name: fastlane |
| 35 | + - name: install fastlane |
19 | 36 | run: bundle install |
20 | 37 |
|
21 | | - - name: pip |
22 | | - run: python3 -m ensurepip |
23 | | - - name: conan |
24 | | - run: pip3 install conan==1.64.1 |
25 | | - - name: conan repo |
26 | | - run: | |
27 | | - conan remote clean |
28 | | - conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan |
29 | | - conan remote add conancenter https://center.conan.io |
| 38 | + - name: install conan |
| 39 | + run: pip3 install conan |
| 40 | + |
| 41 | + - name: conan remote |
| 42 | + run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan |
| 43 | + - name: conan login |
| 44 | + run: conan remote login odr admin --password ${{ secrets.ARTIFACTORY }} |
| 45 | + |
| 46 | + - name: conan profile |
| 47 | + run: conan profile detect |
| 48 | + |
| 49 | + - name: conan install |
| 50 | + run: > |
| 51 | + conan install conan/ |
| 52 | + --output-folder=conan-output |
| 53 | + --build=missing |
| 54 | + --profile:host=conan/profiles/ios-simulator-arm64 |
| 55 | + -s build_type=Release |
| 56 | + -s "&:build_type=RelWithDebInfo" |
| 57 | + -s "odrcore/*:build_type=RelWithDebInfo" |
| 58 | + - name: conan patch |
| 59 | + run: bash conan/patch.sh |
30 | 60 |
|
31 | 61 | - name: run tests |
32 | 62 | run: bundle exec fastlane tests |
33 | | -# - uses: actions/upload-artifact@v2 |
34 | | -# if: ${{ always() }} |
35 | | -# with: |
36 | | -# name: logs |
37 | | -# path: | |
38 | | -# /Users/runner/Library/Developer/Xcode/DerivedData/OpenDocumentReader-*/ |
| 63 | + |
| 64 | + - uses: actions/upload-artifact@v4 |
| 65 | + if: always() |
| 66 | + with: |
| 67 | + name: logs |
| 68 | + path: | |
| 69 | + /Users/runner/Library/Developer/Xcode/DerivedData/OpenDocumentReader-*/ |
| 70 | +
|
| 71 | + - name: upload binaries to conan repo |
| 72 | + run: conan upload "*" --check --confirm --remote odr |
0 commit comments