|
1 | | -name: CI |
| 1 | +name: Build KPF & Pongo |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | # Trigger on all pushes and pull requests |
|
10 | 10 |
|
11 | 11 | jobs: |
12 | 12 | build: |
13 | | - runs-on: ubuntu-20.04 |
| 13 | + runs-on: macos-latest |
14 | 14 | steps: |
15 | | - - name: Install toolchain |
16 | | - run: | |
17 | | - echo 'deb https://assets.checkra.in/debian /' | sudo tee /etc/apt/sources.list.d/checkra1n.list |
18 | | - sudo apt-key adv --fetch-keys https://assets.checkra.in/debian/archive.key |
19 | | - sudo apt-get update |
20 | | - sudo apt-get install -y ld64 cctools-strip |
21 | | - - name: Voodoo magic |
22 | | - id: voodoo |
23 | | - uses: actions/cache@v2 |
24 | | - with: |
25 | | - key: ${{ github.event_name }}-${{ github.ref }}-${{ github.run_id }} |
26 | | - restore-keys: | |
27 | | - push-${{ github.ref }}- |
28 | | - push- |
29 | | - path: | |
30 | | - ** |
31 | 15 | - name: Checkout repository |
32 | | - if: steps.voodoo.outputs.cache-hit != 'true' |
33 | 16 | uses: actions/checkout@v2 |
34 | 17 | with: |
35 | | - submodules: true |
| 18 | + fetch-depth: 0 |
| 19 | + |
36 | 20 | - name: Update repository |
37 | | - if: steps.voodoo.outputs.cache-hit == 'true' |
38 | 21 | run: | |
| 22 | + git submodule update --init --recursive |
39 | 23 | git fetch --all |
40 | 24 | git reset --hard origin/$(git branch --show-current) |
41 | 25 | git submodule update --recursive --remote |
42 | | - - name: Compile |
43 | | - run: EMBEDDED_CC='clang-10' EMBEDDED_AR='llvm-ar-10' EMBEDDED_RANLIB='llvm-ranlib-10' make all |
44 | | - - name: Archive |
45 | | - uses: actions/upload-artifact@v2 |
| 26 | +
|
| 27 | + - name: Compile KPF and Pongo |
| 28 | + run: | |
| 29 | + make |
| 30 | +
|
| 31 | + - name: Prepare upload directory |
| 32 | + run: | |
| 33 | + mkdir upload |
| 34 | + mv build/Pongo.bin upload/ |
| 35 | + mv build/checkra1n-kpf-pongo upload/ |
| 36 | +
|
| 37 | + - name: Compile KPF and Pongo Development |
| 38 | + run: | |
| 39 | + make clean |
| 40 | + make DEV_BUILD=1 |
| 41 | +
|
| 42 | + - name: Prepare upload directory Development |
| 43 | + run: | |
| 44 | + mv build/Pongo.bin upload/Pongo.bin.development |
| 45 | + mv build/checkra1n-kpf-pongo upload/checkra1n-kpf-pongo.development |
| 46 | +
|
| 47 | + - name: Get branch name |
| 48 | + id: branch-name |
| 49 | + uses: tj-actions/branch-names@v7 |
| 50 | + |
| 51 | + - name: Upload artifact |
| 52 | + uses: wangyucode/[email protected] |
46 | 53 | with: |
47 | | - name: PongoOS |
48 | | - path: | |
49 | | - build/checkra1n-kpf-pongo |
50 | | - build/Pongo |
51 | | - build/Pongo.bin |
52 | | - build/PongoConsolidated.bin |
| 54 | + host: ${{ secrets.NICKCHAN_FTP_HOST }} |
| 55 | + port: ${{ secrets.NICKCHAN_FTP_PORT }} |
| 56 | + username: palera1n |
| 57 | + password: ${{ secrets.NICKCHAN_FTP_PASS }} |
| 58 | + forceUpload: true |
| 59 | + dryRun: false |
| 60 | + localDir: 'upload' |
| 61 | + remoteDir: "/palera1n/artifacts/kpf/${{ steps.branch-name.outputs.ref_branch || github.ref }}" |
| 62 | + |
0 commit comments