Merge pull request #15 from sudhackar/main #3
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-linux: | |
| name: Build for Linux | |
| runs-on: ubuntu-latest | |
| env: | |
| IDASDK: ${{ github.workspace }}/ida-sdk/src | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Prepare IDA SDK and helpers | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| git clone --depth 1 https://github.com/HexRaysSA/ida-sdk ida-sdk | |
| mkdir -p "${IDASDK}" | |
| git clone --depth 1 https://github.com/allthingsida/ida-cmake "${IDASDK}/ida-cmake" | |
| mkdir -p "${IDASDK}/include" | |
| git clone --depth 1 https://github.com/allthingsida/idax "${IDASDK}/include/idax" | |
| git clone --depth 1 https://github.com/allthingsida/idacpp "${IDASDK}/include/idacpp" | |
| - name: Configure (Linux) | |
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: Build (Linux) | |
| run: cmake --build build -- -j2 | |
| - name: Upload Linux artifact (qscripts.so) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qscripts-linux | |
| path: ${{ env.IDASDK }}/bin/plugins/qscripts.so | |
| build-macos: | |
| name: Build for macOS | |
| runs-on: macos-latest | |
| env: | |
| IDASDK: ${{ github.workspace }}/ida-sdk/src | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Prepare IDA SDK and helpers | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| git clone --depth 1 https://github.com/HexRaysSA/ida-sdk ida-sdk | |
| mkdir -p "${IDASDK}" | |
| git clone --depth 1 https://github.com/allthingsida/ida-cmake "${IDASDK}/ida-cmake" | |
| mkdir -p "${IDASDK}/include" | |
| git clone --depth 1 https://github.com/allthingsida/idax "${IDASDK}/include/idax" | |
| git clone --depth 1 https://github.com/allthingsida/idacpp "${IDASDK}/include/idacpp" | |
| - name: Configure (macOS) | |
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: Build (macOS) | |
| run: cmake --build build -- -j2 | |
| - name: Upload macOS artifact (qscripts.dylib) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qscripts-macos | |
| path: ${{ env.IDASDK }}/bin/plugins/qscripts.dylib | |
| build-windows: | |
| name: Build for Windows | |
| runs-on: windows-latest | |
| env: | |
| IDASDK: ${{ github.workspace }}/ida-sdk/src | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Prepare IDA SDK and helpers | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| git clone --depth 1 https://github.com/HexRaysSA/ida-sdk ida-sdk | |
| mkdir -p "${IDASDK}" | |
| git clone --depth 1 https://github.com/allthingsida/ida-cmake "${IDASDK}/ida-cmake" | |
| mkdir -p "${IDASDK}/include" | |
| git clone --depth 1 https://github.com/allthingsida/idax "${IDASDK}/include/idax" | |
| git clone --depth 1 https://github.com/allthingsida/idacpp "${IDASDK}/include/idacpp" | |
| - name: Configure (Windows) | |
| run: cmake -S . -B build -A x64 | |
| - name: Build (Windows) | |
| run: cmake --build build --config Release -- /m | |
| - name: Upload Windows artifact (qscripts.dll) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qscripts-windows | |
| path: ${{ env.IDASDK }}/bin/plugins/qscripts.dll | |
| publish-release: | |
| name: Publish Release | |
| runs-on: ubuntu-latest | |
| needs: [ build-linux, build-macos, build-windows ] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: qscripts-* | |
| path: release | |
| merge-multiple: true | |
| - name: List release files | |
| run: | | |
| ls -la release || true | |
| - name: Create GitHub Release and upload assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| files: | | |
| release/qscripts.dylib | |
| release/qscripts.so | |
| release/qscripts.dll |