Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add Windows, macOS, Linux, iOS, and Android
And improve the FreeBSD and QNX jobs to also upload artifacts.
- Loading branch information
Showing
16 changed files
with
2,193 additions
and
182 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Package single-file artifact | ||
description: Downloads an artifact and uploads a compressed version of its file | ||
inputs: | ||
name: | ||
required: true | ||
description: Artifact name | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Download | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: ${{ inputs.name }} | ||
- name: Compress | ||
run: | | ||
readarray -t files < <(ls -1 ${{ inputs.name }}) | ||
n=${#files[@]} | ||
if [ $n -ne 1 ]; then | ||
echo "Artifact may only contain a single file" > /dev/stderr | ||
exit 1 | ||
fi | ||
file=${files[0]} | ||
if echo $file | grep -q '\.'; then | ||
extension=".$(echo $file | cut -d'.' -f2-).xz" | ||
else | ||
extension=".xz" | ||
fi | ||
xz -c -T 0 ${{ inputs.name }}/$file > ${{ inputs.name }}/${{ inputs.name }}$extension | ||
rm ${{ inputs.name }}/$file | ||
shell: bash | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: release-assets | ||
path: ${{ inputs.name }}/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Package artifact files as SFX | ||
description: Downloads a specific artifact and uploads a packaged version of it | ||
inputs: | ||
name: | ||
required: true | ||
description: Artifact name | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Download | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: ${{ inputs.name }} | ||
- name: Compress | ||
run: | | ||
cd ${{ inputs.name }} | ||
7z a -sfx -r ..\${{ inputs.name }}.exe . | ||
shell: pwsh | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: release-assets | ||
path: ${{ inputs.name }}.exe |
24 changes: 24 additions & 0 deletions
24
.github/actions/package-artifact-files-as-tarball/action.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Package artifact files as tarball | ||
description: Downloads a specific artifact and uploads a packaged version of it | ||
inputs: | ||
name: | ||
required: true | ||
description: Artifact name | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Download | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: ${{ inputs.name }} | ||
- name: Compress | ||
run: tar -C ${{ inputs.name }} -cJf ${{ inputs.name }}.tar.xz . | ||
env: | ||
XZ_OPT: "-T 0" | ||
shell: bash | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: release-assets | ||
path: ${{ inputs.name }}.tar.xz |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Package iOS assets | ||
description: Downloads iOS assets and packages them | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Download iOS assets | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ios-assets | ||
path: build/ios-assets/ | ||
- name: Create frida-server iOS .deb | ||
run: | | ||
mkdir -p build/release-assets | ||
cd build | ||
../frida-core/tools/package-server-ios.sh \ | ||
ios-assets \ | ||
release-assets/frida_${FRIDA_VERSION}_iphoneos-arm.deb | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Publish iOS packages | ||
description: Publishes already packaged iOS debs | ||
inputs: | ||
site: | ||
required: true | ||
path: Where to publish; set to either “production” or “development” | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Create iOS repo metadata | ||
run: | | ||
cd build | ||
rm -rf ios-repo-config | ||
mkdir ios-repo-config | ||
( | ||
echo "Origin: Cydia/Frida" | ||
echo "Label: frida" | ||
echo "Suite: stable" | ||
echo "Version: 1.0" | ||
echo "Codename: stable" | ||
echo "Architectures: iphoneos-arm" | ||
echo "Components: main" | ||
echo "Description: Frida for iOS" | ||
) > ios-repo-config/distributions | ||
rm -rf ios-repo | ||
mkdir -p ios-repo/debs | ||
cd ios-repo | ||
( | ||
echo "Origin: Frida" | ||
echo "Label: Frida" | ||
echo "Suite: stable" | ||
echo "Version: 1.0" | ||
echo "Codename: ios" | ||
echo "Architectures: iphoneos-arm" | ||
echo "Components: main" | ||
echo "Description: Official Frida Repo" | ||
) > Release | ||
for file in frida_${FRIDA_VERSION}_iphoneos-arm.deb; do | ||
cp $GITHUB_WORKSPACE/build/release-assets/$file debs/ | ||
reprepro \ | ||
-Vb . \ | ||
--confdir $GITHUB_WORKSPACE/build/ios-repo-config \ | ||
--ignore=forbiddenchar \ | ||
includedeb \ | ||
stable \ | ||
debs/$file | ||
done | ||
cp dists/stable/main/binary-iphoneos-arm/Packages.gz . | ||
gunzip -k Packages.gz | ||
shell: bash | ||
- name: Upload iOS package and repo metadata | ||
run: | | ||
cd build/ios-repo | ||
case ${{ inputs.site }} in | ||
production) | ||
prefix= | ||
;; | ||
development) | ||
prefix=/dev | ||
;; | ||
*) | ||
echo "Invalid repo specified" > /dev/stderr | ||
exit 1 | ||
esac | ||
aws s3 sync --delete pool/ s3://build.frida.re${prefix}/pool/ | ||
for file in Release Packages Packages.gz; do | ||
aws s3 cp $file s3://build.frida.re${prefix}/ | ||
done | ||
for file in Packages Packages.gz; do | ||
aws s3 cp $file s3://build.frida.re${prefix}/./ | ||
done | ||
urls_to_invalidate=() | ||
for file in Release Packages Packages.gz ./Packages ./Packages.gz; do | ||
urls_to_invalidate+=("https://build.frida.re${prefix}/${file}") | ||
done | ||
cfcli purge ${urls_to_invalidate[@]} | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Publish Python bindings | ||
description: Publishes Python source distribution and wheels to PyPI | ||
inputs: | ||
site: | ||
required: true | ||
path: Where to publish; set to either “production” or “development” | ||
pypi-token: | ||
required: true | ||
description: The token used to authenticate with pypi.org | ||
testpypi-token: | ||
required: true | ||
description: The token used to authenticate with test.pypi.org | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Create source distribution | ||
run: | | ||
cd frida-python | ||
python setup.py sdist --dist-dir ../build/python-packages | ||
shell: bash | ||
- name: Download wheel for Windows/x86 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: frida-python-windows-x86 | ||
path: build/python-packages/ | ||
- name: Download wheel for Windows/x86_64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: frida-python-windows-x86_64 | ||
path: build/python-packages/ | ||
- name: Download wheel for macOS/x86_64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: frida-python-macos-x86_64 | ||
path: build/python-packages/ | ||
- name: Download wheel for macOS/arm64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: frida-python-macos-arm64 | ||
path: build/python-packages/ | ||
- name: Download wheel for Linux/x86 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: frida-python-linux-x86 | ||
path: build/python-packages/ | ||
- name: Download wheel for Linux/x86_64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: frida-python-linux-x86_64 | ||
path: build/python-packages/ | ||
- name: Download wheel for Linux/armhf | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: frida-python-linux-armhf | ||
path: build/python-packages/ | ||
- name: Download wheel for Linux/arm64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: frida-python-linux-arm64 | ||
path: build/python-packages/ | ||
- name: Publish to pypi.org | ||
if: inputs.site == 'production' | ||
uses: pypa/gh-action-pypi-publish@release/v1.5 | ||
with: | ||
password: ${{ inputs.pypi-token }} | ||
packages_dir: build/python-packages/ | ||
- name: Publish to test.pypi.org | ||
if: inputs.site == 'development' | ||
uses: pypa/gh-action-pypi-publish@release/v1.5 | ||
with: | ||
password: ${{ inputs.testpypi-token }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
packages_dir: build/python-packages/ |
Oops, something went wrong.