name: LeoCAD CI on: push: branches: [ "master" ] permissions: contents: read jobs: build-ubuntu: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install Qt uses: jurplel/install-qt-action@v4 with: version: '5.15.*' 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@v4 with: version: '6.11.*' cache: 'true' - name: Cache Library uses: actions/cache@v3 id: cache-library with: path: library.bin key: library-26.08 - name: Download Library if: steps.cache-library.outputs.cache-hit != 'true' run: | wget https://github.com/leozide/leocad/releases/download/v26.09/Library-26.08.zip -O library.zip unzip library.zip - name: Cache POV-Ray uses: actions/cache@v3 id: cache-povray with: path: povray key: povray-build1 - name: Download POV-Ray if: steps.cache-povray.outputs.cache-hit != 'true' run: | wget https://github.com/leozide/povray/releases/download/build1/povray chmod +x povray curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/leozide/leocad/commits/master | jq -r '.sha' > remote.txt REMOTE=$(cat remote.txt) echo "REMOTE=$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 }}