Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 90 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,41 +55,120 @@ jobs:
path: dist/*

build-windows:
runs-on: windows-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ilammy/msvc-dev-cmd@v1
with:
targets: x86_64-pc-windows-gnu

- name: Build binaries
- name: Install mingw-w64
run: |
choco install nsis.portable
make windows PROFILE=release NSIS=1
sudo apt-get update
sudo apt-get install -y mingw-w64

- name: Build binaries (cross-compile)
run: |
cargo build --bins --workspace --release --target x86_64-pc-windows-gnu
mkdir -p dist
cp target/x86_64-pc-windows-gnu/release/plumeimpactor.exe dist/Impactor-windows-x86_64-portable.exe
cp target/x86_64-pc-windows-gnu/release/plumesign.exe dist/plumesign-windows-x86_64.exe

- name: Upload Bundles
uses: actions/upload-artifact@v4
with:
name: ${{ env.BINARY_NAME }}-windows
path: dist/*.exe

package-windows:
runs-on: windows-latest
needs: [build-windows]
steps:
- uses: actions/checkout@v4

- name: Download Windows Artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.BINARY_NAME }}-windows
path: dist

- name: Install NSIS
run: choco install nsis.portable

- name: Build NSIS Installer
run: |
mkdir dist\nsis
copy package\windows\* dist\nsis\
copy dist\Impactor-windows-x86_64-portable.exe dist\nsis\plumeimpactor.exe
makensis dist\nsis\installer.nsi
move dist\nsis\installer.exe dist\Impactor-windows-x86_64-setup.exe

- name: Upload Installer
uses: actions/upload-artifact@v4
with:
name: ${{ env.BINARY_NAME }}-windows-installer
path: dist/Impactor-windows-x86_64-setup.exe

build-macos-slices:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- os: macos-latest
target: aarch64-apple-darwin
- target: aarch64-apple-darwin
arch: arm
- os: macos-15-intel
target: x86_64-apple-darwin
suffix: arm64
osxcross_prefix: arm64-apple-darwin21.4
- target: x86_64-apple-darwin
arch: intel
suffix: x86_64
osxcross_prefix: x86_64-apple-darwin21.4
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Setup osxcross
uses: Timmmm/setup-osxcross@v3
with:
osx-version: "12.3"

- name: Build binaries (${{ matrix.arch }})
run: |
make macos PROFILE=release
target_env=$(echo "${{ matrix.target }}" | tr '-' '_')
target_env_upper=$(echo "${target_env}" | tr '[:lower:]' '[:upper:]')
prefix="${{ matrix.osxcross_prefix }}"
osxcross_bin="$(dirname "$(command -v "${prefix}-clang")")"
osxcross_root="$(cd "${osxcross_bin}/.." && pwd)"
sdk_dir="${osxcross_root}/SDK"
if [ -d "${sdk_dir}" ]; then
sdkroot="$(ls -d "${sdk_dir}"/MacOSX*.sdk 2>/dev/null | sort -V | tail -n1)"
if [ -n "${sdkroot}" ]; then
export SDKROOT="${sdkroot}"
fi
fi
export MACOSX_DEPLOYMENT_TARGET="11.0"
ld_path=""
for name in "${prefix}-ld" "${prefix}-ld64" "ld64" "ld"; do
if [ -x "${osxcross_bin}/${name}" ]; then
ld_path="${osxcross_bin}/${name}"
break
fi
done
export "CC_${target_env}=${osxcross_bin}/${prefix}-clang"
export "CXX_${target_env}=${osxcross_bin}/${prefix}-clang++"
export "AR_${target_env}=${osxcross_bin}/${prefix}-ar"
export "RANLIB_${target_env}=${osxcross_bin}/${prefix}-ranlib"
export "CARGO_TARGET_${target_env_upper}_LINKER=${osxcross_bin}/${prefix}-clang"
if [ -n "${ld_path}" ]; then
export "CFLAGS_${target_env}=-fuse-ld=${ld_path}"
export "CXXFLAGS_${target_env}=-fuse-ld=${ld_path}"
export "LDFLAGS_${target_env}=-fuse-ld=${ld_path}"
export RUSTFLAGS="${RUSTFLAGS:+$RUSTFLAGS }-C link-arg=-fuse-ld=${ld_path}"
fi
cargo build --bins --workspace --release --target ${{ matrix.target }}
mkdir -p dist
cp target/${{ matrix.target }}/release/plumeimpactor dist/plumeimpactor-macos-${{ matrix.suffix }}
cp target/${{ matrix.target }}/release/plumesign dist/plumesign-macos-${{ matrix.suffix }}

- name: Upload ${{ matrix.arch }} Slice
uses: actions/upload-artifact@v4
Expand Down
145 changes: 35 additions & 110 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,7 @@ incremental = true # Improves re-compile times
tokio = { version = "1.43", features = ["full"] }
# Application
idevice = { git = "https://github.com/PlumeImpactor/plume-idevice", rev = "5e350a", features = [
"afc",
"installation_proxy",
"debug_proxy",
"rsd",
"tunnel_tcp_stack",
"heartbeat",
"usbmuxd",
"house_arrest",
"pair",
"full"
] }
plist = "1.8.0"

Expand Down
Loading