Update build.yml #1
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 (Windows / macOS / Linux) | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| project_dir: | ||
| required: false | ||
| type: string | ||
| default: "." | ||
| jobs: | ||
| build: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [windows-latest, ubuntu-latest, macos-latest, macos-15-intel] | ||
| runs-on: ${{ matrix.os }} | ||
| defaults: | ||
| run: | ||
| working-directory: ${{ inputs.project_dir }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| ssh-key: ${{ CHECKOUT_SSH_KEY || '' }} | ||
| - name: Install Conan | ||
| uses: conan-io/setup-conan@v1 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.x" | ||
| - name: Install Python requirements | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install -r scripts/go/requirements.txt | ||
| - name: Build project | ||
| run: python scripts/go/main.py -y | ||
| - name: Package build | ||
| run: python scripts/project_packager.py package | ||
| - name: Find zip file | ||
| id: zip | ||
| shell: bash | ||
| run: | | ||
| python scripts/project_packager.py gha_zip_file_name >> $GITHUB_OUTPUT | ||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ steps.zip.outputs.zip_file }} | ||
| path: ${{ steps.zip.outputs.zip_file }} | ||