Ghidra: 11.1.2, XbSymbolDatabase: 3.1.160 #197
Workflow file for this run
This file contains 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: | |
paths-ignore: | |
- '.github/*' | |
- '.github/*_TEMPLATE/**' | |
- '*.md' | |
pull_request: | |
paths-ignore: | |
- '.github/*' | |
- '.github/*_TEMPLATE/**' | |
- '*.md' | |
workflow_dispatch: | |
jobs: | |
Build-Ubuntu: | |
runs-on: ubuntu-latest | |
outputs: | |
GHIDRA_VER: ${{ steps.build.outputs.GHIDRA_VER }} | |
GHIDRA_ARCHIVE: ${{ steps.build.outputs.GHIDRA_ARCHIVE }} | |
GHIDRA_URL: ${{ steps.build.outputs.GHIDRA_URL }} | |
JAVA_VER: x # Latest | |
BUILD_TAG: ${{ steps.build.outputs.BUILD_TAG }} | |
steps: | |
- name: Clone Tree | |
uses: actions/checkout@v2 | |
- name: Install xsltproc | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install xsltproc | |
- name: Build | |
id: build | |
run: ./build.sh | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist | |
if-no-files-found: error | |
Test-Windows: | |
needs: Build-Ubuntu | |
runs-on: windows-latest | |
env: | |
POWERSHELL_TELEMETRY_OPTOUT: 1 | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ needs.Build-Ubuntu.outputs.JAVA_VER }} | |
- name: Install Ghidra | |
run: | | |
curl -SsfLO ${{ needs.Build-Ubuntu.outputs.GHIDRA_URL }} | |
Expand-Archive -Path ${{ needs.Build-Ubuntu.outputs.GHIDRA_ARCHIVE }} -DestinationPath . | |
- name: Install Extension | |
run: Expand-Archive -Path dist\*ghidra-xbe.zip -DestinationPath ghidra_${{ needs.Build-Ubuntu.outputs.GHIDRA_VER }}\Ghidra\Extensions | |
- name: Run Tests | |
run: | | |
ghidra_${{ needs.Build-Ubuntu.outputs.GHIDRA_VER }}\support\analyzeHeadless . test_project ` | |
-import ghidra_${{ needs.Build-Ubuntu.outputs.GHIDRA_VER }}\Ghidra\Extensions\ghidra-xbe\tests\xbefiles\triangle.xbe ` | |
-postScript ghidra_${{ needs.Build-Ubuntu.outputs.GHIDRA_VER }}\Ghidra\Extensions\ghidra-xbe\tests\test_load.py | |
Test-macOS: | |
needs: Build-Ubuntu | |
runs-on: macos-latest | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ needs.Build-Ubuntu.outputs.JAVA_VER }} | |
- name: Install Ghidra | |
run: | | |
wget -nv ${{ needs.Build-Ubuntu.outputs.GHIDRA_URL }} | |
unzip ${{ needs.Build-Ubuntu.outputs.GHIDRA_ARCHIVE }} | |
- name: Install Extension | |
run: unzip dist/*ghidra-xbe.zip -d ghidra_${{ needs.Build-Ubuntu.outputs.GHIDRA_VER }}/Ghidra/Extensions | |
- name: Run Tests | |
run: | | |
ghidra_${{ needs.Build-Ubuntu.outputs.GHIDRA_VER }}/support/analyzeHeadless . test_project \ | |
-import ghidra_${{ needs.Build-Ubuntu.outputs.GHIDRA_VER }}/Ghidra/Extensions/ghidra-xbe/tests/xbefiles/triangle.xbe \ | |
-postScript ghidra_${{ needs.Build-Ubuntu.outputs.GHIDRA_VER }}/Ghidra/Extensions/ghidra-xbe/tests/test_load.py | |
Create-Release: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
needs: [Build-Ubuntu, Test-Windows, Test-macOS] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
- name: Get Package Info | |
id: pkg_info | |
working-directory: dist | |
run: echo "::set-output name=PKG_NAME::$(ls *ghidra-xbe.zip)" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ needs.Build-Ubuntu.outputs.BUILD_TAG }} | |
release_name: ${{ needs.Build-Ubuntu.outputs.BUILD_TAG }} | |
- name: Upload Release Assets | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_name: ${{ steps.pkg_info.outputs.PKG_NAME }} | |
asset_path: dist/${{ steps.pkg_info.outputs.PKG_NAME }} | |
asset_content_type: application/zip |