build-snapshot #154
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 | |
| uses: alexx2000/lazarus-install@mac | |
| with: | |
| lazarus-version: "stable" | |
| - name: Get Lazarus source | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: 'fpc/Lazarus' | |
| - name: Build and install Lazarus | |
| run: | | |
| echo "-XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" >> /etc/fpc.cfg | |
| echo "-Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib" >> /etc/fpc.cfg | |
| echo "-FD/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin" >> /etc/fpc.cfg | |
| cat /etc/fpc.cfg | |
| 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 |