File: continuous.yml

package info (click to toggle)
leocad 25.09-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,008 kB
  • sloc: cpp: 51,794; xml: 11,265; python: 81; sh: 52; makefile: 16
file content (65 lines) | stat: -rw-r--r-- 2,046 bytes parent folder | download
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: LeoCAD CI

on:
  push:
    branches: [ "master" ]

jobs:
  build-ubuntu:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Install Qt
      uses: jurplel/install-qt-action@v4  
      with:
        cache: 'true'
    - name: Get number of CPU cores
      uses: SimenB/github-actions-cpu-cores@v1
      id: cpu-cores
    - name: Generate Makefile
      run: qmake PREFIX=/usr
    - name: Build
      run: make -j ${{ steps.cpu-cores.outputs.count }}

  build-macos:
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v3
    - name: Install Qt
      uses: jurplel/install-qt-action@v3  
      with:
        cache: 'true'
    - name: Cache Library
      uses: actions/cache@v3
      id: cache-library
      with:
        path: library.bin
        key: library-25.08
    - name: Download Library
      if: steps.cache-library.outputs.cache-hit != 'true'
      run: |
        wget https://github.com/leozide/leocad/releases/download/v23.03/Library-25.08.zip -O library.zip
        unzip library.zip
    - name: Cache POV-Ray
      uses: actions/cache@v3
      id: cache-povray
      with:
        path: povray
        key: povray-20.03
    - name: Download POV-Ray
      if: steps.cache-povray.outputs.cache-hit != 'true'
      run: |
        wget https://github.com/leozide/povray/releases/download/continuous/povray
        chmod +x povray
        curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/leozide/leocad/commits/master -o repo.txt
        echo < repo.txt
        echo export REMOTE=$(grep -Po '(?<=: \")(([a-z0-9])\w+)(?=\")' -m 1 repo.txt)
        export REMOTE=$(grep -Po '(?<=: \")(([a-z0-9])\w+)(?=\")' -m 1 repo.txt)
        echo $REMOTE        
    - name: Get number of CPU cores
      uses: SimenB/github-actions-cpu-cores@v1
      id: cpu-cores
    - name: Generate Makefile
      run: qmake -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path)/usr/lib PREFIX=/usr
    - name: Build
      run: make -j ${{ steps.cpu-cores.outputs.count }}