build-snapshot #158
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build-snapshot | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - 'components/**' | |
| - 'plugins/**' | |
| - 'sdk/**' | |
| - 'src/**' | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-mac: | |
| runs-on: macos-15 | |
| steps: | |
| - name: Install Free Pascal | |
| run: | | |
| curl -L -o bootstrap.dmg \ | |
| https://github.com/alexx2000/fpc-3.2.x/releases/download/v3.2.3-g3d1bdd937f/fpc-3.2.3-g3d1bdd937f-aarch64-macosx.dmg | |
| hdiutil attach bootstrap.dmg -mountpoint /Volumes/fpc-bootstrap | |
| ls -la /Volumes/fpc-bootstrap/ | |
| sudo installer -pkg /Volumes/fpc-bootstrap/fpc-3.2.3-g3d1bdd937f-aarch64-macosx/fpc-3.2.3-g3d1bdd937f-aarch64-macosx.pkg -target / | |
| hdiutil detach /Volumes/fpc-bootstrap | |
| - name: Create Free Pascal config | |
| run: | | |
| sudo fpcmkcfg -d "basepath=/usr/local/lib/fpc/3.2.3" -o /etc/fpc.cfg | |
| - name: Get Lazarus source | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: 'fpc/Lazarus' | |
| - name: Build and install Lazarus | |
| run: | | |
| make all | |
| sudo make install | |
| - name: Create Lazarus config | |
| run: | | |
| mkdir -p $HOME/.lazarus | |
| cp tools/install/macosx/environmentoptions.xml $HOME/.lazarus/environmentoptions.xml | |
| sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" $HOME/.lazarus/environmentoptions.xml | |
| - name: Checkout source | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Prepare source | |
| run: sed -i -e "s|BOX_CLIENT_SECRET = '\*'|BOX_CLIENT_SECRET = '$BOX_CLIENT_SECRET'|g" plugins/wfx/MacCloud/src/drivers/oauth2/box/uboxclient.pas | |
| env: | |
| BOX_CLIENT_SECRET: ${{ secrets.BOX_CLIENT_SECRET }} | |
| - name: Build packages | |
| run: ./.github/scripts/create_snapshot.sh | |
| - name: Share data between jobs | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: snapshot-mac | |
| retention-days: 1 | |
| compression-level: 0 | |
| path: doublecmd-release/doublecmd*.dmg | |
| upload: | |
| needs: [build-mac] | |
| runs-on: ubuntu-latest | |
| environment: snapshots | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| merge-multiple: true |