Skip to content

Commit

Permalink
Create offline source tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jan 23, 2023
1 parent 7167458 commit 06d9a90
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ jobs:
name: linux-acr-ok
path: r2ghidra_sleigh-*.zip

tarball:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Building tars
run: make -C dist/tarball
- name: Uploading balls
uses: actions/upload-artifact@v3
with:
name: tarball
path: dist/tarball/radare2-*

linux-asan:
if: ${{ false }} # disable for now
# The type of runner that the job will run on
Expand Down Expand Up @@ -224,6 +237,24 @@ jobs:
asset_path: dist/artifacts/macos-acr-ok/r2ghidra-${{ steps.r2gv.outputs.branch }}-macos.zip
asset_name: r2ghidra-${{ steps.r2gv.outputs.branch }}-macos.zip
asset_content_type: application/zip
- name: Upload zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/artifacts/tarball/r2ghidra-${{ steps.r2gv.outputs.branch }}.zip
asset_name: r2ghidra-${{ steps.r2gv.outputs.branch }}.zip
asset_content_type: application/zip
- name: Upload tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/artifacts/tarball/r2ghidra-${{ steps.r2gv.outputs.branch }}.tar.xz
asset_name: r2ghidra-${{ steps.r2gv.outputs.branch }}.tar.xz
asset_content_type: application/x-txz
- name: Upload asset for Windows (w64)
uses: actions/upload-release-asset@v1
env:
Expand Down
2 changes: 2 additions & 0 deletions dist/tarball/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
./tarball.sh
18 changes: 18 additions & 0 deletions dist/tarball/tarball.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

V=`../../configure -qV`
if [ -z "${V}" ] ; then
echo "Cant run ./configure -qV"
exit 1
fi
rm -rf r2ghidra-${V}
git clone ../.. r2ghidra-${V} || exit 1
cd r2ghidra-${V} || exit 1
./preconfigure || exit 1
rm -rf .git ghidra-native/.git third-party/pugixml/.git
cd ..
rm -f r2ghidra-${V}.tar.xz
tar cJvf r2ghidra-${V}.tar.xz r2ghidra-${V}
rm -f r2ghidra-${V}.zip
zip -9 -r r2ghidra-${V}.zip r2ghidra-${V}
rm -rf r2ghidra-${V}

0 comments on commit 06d9a90

Please sign in to comment.