feat: enable copilot provider in libagents #163
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 | |
| on: | |
| push: | |
| branches: ["**"] | |
| tags: ["v*", "V*"] | |
| pull_request: | |
| branches: ["**"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ============================================================================ | |
| # Build (CLI + Plugin) | |
| # ============================================================================ | |
| build-linux: | |
| name: Build (Linux) | |
| runs-on: ubuntu-latest | |
| env: | |
| IDASDK: ${{ github.workspace }}/ida-sdk | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Checkout submodules | |
| run: git submodule update --init --recursive | |
| - name: Setup IDA SDK | |
| run: git clone --depth 1 --recurse-submodules https://github.com/HexRaysSA/ida-sdk ida-sdk | |
| - name: Configure | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DIDASQL_WITH_AI_AGENT=ON -DIDASQL_BUILD_EXAMPLES=ON | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Upload plugin | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plugin-linux | |
| path: ${{ env.IDASDK }}/src/bin/plugins/idasql.so | |
| - name: Upload CLI | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cli-linux | |
| path: build/bin/idasql | |
| build-macos: | |
| name: Build (macOS) | |
| runs-on: macos-latest | |
| env: | |
| IDASDK: ${{ github.workspace }}/ida-sdk | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Checkout submodules | |
| run: git submodule update --init --recursive | |
| - name: Setup IDA SDK | |
| run: git clone --depth 1 --recurse-submodules https://github.com/HexRaysSA/ida-sdk ida-sdk | |
| - name: Configure | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DIDASQL_WITH_AI_AGENT=ON -DIDASQL_BUILD_EXAMPLES=ON | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Upload plugin | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plugin-macos | |
| path: ${{ env.IDASDK }}/src/bin/plugins/idasql.dylib | |
| - name: Upload CLI | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cli-macos | |
| path: build/bin/idasql | |
| build-windows: | |
| name: Build (Windows) | |
| runs-on: windows-latest | |
| env: | |
| IDASDK: ${{ github.workspace }}/ida-sdk | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Checkout submodules | |
| shell: bash | |
| run: git submodule update --init --recursive | |
| - name: Setup IDA SDK | |
| shell: bash | |
| run: git clone --depth 1 --recurse-submodules https://github.com/HexRaysSA/ida-sdk ida-sdk | |
| - name: Configure | |
| run: cmake -B build -DIDASQL_WITH_AI_AGENT=ON -DIDASQL_BUILD_EXAMPLES=ON | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Upload plugin | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plugin-windows | |
| path: ${{ env.IDASDK }}/src/bin/plugins/idasql.dll | |
| - name: Upload CLI | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cli-windows | |
| path: build/bin/Release/idasql.exe | |
| # ============================================================================ | |
| # Release | |
| # ============================================================================ | |
| publish-release: | |
| name: Publish Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: [build-linux, build-macos, build-windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download plugins | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: plugin-* | |
| path: plugins | |
| merge-multiple: true | |
| - name: Download CLI (Linux) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: cli-linux | |
| path: cli-linux | |
| - name: Download CLI (macOS) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: cli-macos | |
| path: cli-macos | |
| - name: Download CLI (Windows) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: cli-windows | |
| path: cli-windows | |
| - name: Prepare release | |
| run: | | |
| mkdir -p release/plugin | |
| mkdir -p release/cli/{windows,linux,macos} | |
| # Plugin (flat, IDA-compatible) | |
| cp plugins/idasql.dll release/plugin/ || true | |
| cp plugins/idasql.so release/plugin/ || true | |
| cp plugins/idasql.dylib release/plugin/ || true | |
| cp ida-plugin.json release/plugin/ | |
| # CLI (organized by platform) | |
| cp cli-windows/idasql.exe release/cli/windows/ || true | |
| cp cli-linux/idasql release/cli/linux/ || true | |
| cp cli-macos/idasql release/cli/macos/ || true | |
| echo "=== Plugin ===" && ls -la release/plugin/ | |
| echo "=== CLI ===" && ls -laR release/cli/ | |
| - name: Create plugin zip | |
| run: | | |
| cd release/plugin | |
| zip -9 ../idasql_plugin-${{ github.ref_name }}.zip * | |
| - name: Create CLI zip | |
| run: | | |
| cd release/cli | |
| zip -r9 ../idasql_cli-${{ github.ref_name }}.zip windows linux macos | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: IDASQL ${{ github.ref_name }} | |
| generate_release_notes: true | |
| files: | | |
| release/idasql_plugin-${{ github.ref_name }}.zip | |
| release/idasql_cli-${{ github.ref_name }}.zip |