name: Build iDescriptor on: push: branches: ['main'] pull_request: branches: ['main'] workflow_dispatch: jobs: build: strategy: matrix: os: [ubuntu-22.04] # os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout repository uses: actions/checkout@v4 with: submodules: 'recursive' token: ${{ secrets.PAT }} - name: Install Qt uses: jurplel/install-qt-action@v3 with: version: '6.7.2' modules: 'qtmultimedia qtlocation qtpositioning qtserialport' - name: Set up Go uses: actions/setup-go@v6 with: go-version: '^1.23.0' - name: Install Linux dependencies (apt) if: runner.os == 'Linux' run: | sudo apt-get update sudo apt-get install -y \ build-essential \ autoconf \ automake \ checkinstall \ git \ pkg-config \ libpugixml-dev \ libusb-1.0-0-dev \ libqrencode-dev \ libirecovery-1.0-dev \ libcurl4-openssl-dev \ libusbmuxd-dev \ libssl-dev \ libtool-bin \ libreadline-dev \ libavahi-compat-libdnssd-dev \ libavcodec-dev \ libavutil-dev \ libswscale-dev \ libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ libfuse2 \ libunwind-dev \ libxcb-cursor0 \ libxkbcommon-x11-0 \ # required version is '>= 2.6.0' - name: Install libplist if: runner.os == 'Linux' run: | git clone https://github.com/libimobiledevice/libplist.git cd libplist ./autogen.sh sudo make install - name: Install libtatsu if: runner.os == 'Linux' run: | git clone https://github.com/libimobiledevice/libtatsu.git cd libtatsu ./autogen.sh sudo make install - name: Install libimobiledevice-glue if: runner.os == 'Linux' run: | git clone https://github.com/libimobiledevice/libimobiledevice-glue.git cd libimobiledevice-glue ./autogen.sh sudo make install - name: Install libimobiledevice if: runner.os == 'Linux' run: | git clone https://github.com/libimobiledevice/libimobiledevice.git cd libimobiledevice ./autogen.sh sudo make install - name: Install libirecovery if: runner.os == 'Linux' run: | git clone https://github.com/libimobiledevice/libirecovery.git cd libirecovery ./autogen.sh sudo make install - name: Update linker cache if: runner.os == 'Linux' run: sudo ldconfig - name: Install macOS dependencies (brew) if: runner.os == 'macOS' run: | brew install \ pkg-config \ pugixml \ libusb \ libplist \ qrencode \ openssl \ libssh \ libzip \ libimobiledevice \ libimobiledevice-glue \ irecovery - name: Install Windows dependencies (vcpkg) if: runner.os == 'Windows' uses: lukka/run-vcpkg@v11 with: vcpkgGitCommitId: '1e975a6660e725c1b23f7234b02e4d94c33745e3' vcpkgJsonGlob: '**/vcpkg.json' # Recommended to create a vcpkg.json # If not using vcpkg.json, you can install manually: # run: | # vcpkg install pugixml libusb libplist qrencode openssl libssh libzip --triplet x64-windows - name: Configure CMake (Linux/macOS) if: runner.os == 'Linux' || runner.os == 'macOS' run: | cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DRUN_CLANG_TIDY=OFF - name: Configure CMake (Windows) if: runner.os == 'Windows' run: | cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake - name: Build with CMake run: cmake --build build --config Release - name: Prepare for AppImage if: runner.os == 'Linux' run: | cp icons/icon.png build/iDescriptor.png # Copy the Go library to the same directory as the executable cp build/src/lib/ipatool-go/libipatool-go.so build/ # Create a .desktop file required for the AppImage cat < build/iDescriptor.desktop [Desktop Entry] Name=iDescriptor Exec=iDescriptor Icon=iDescriptor Type=Application Categories=Utility; EOF - name: Install linuxdeployqt if: runner.os == 'Linux' run: | wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" chmod a+x linuxdeployqt-continuous-x86_64.AppImage - name: Build AppImage if: runner.os == 'Linux' working-directory: ./build run: | export VERSION=1.0.0 # Include the Go library as an additional executable/library ../linuxdeployqt-continuous-x86_64.AppImage iDescriptor -executable=libipatool-go.so -appimage - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: iDescriptor-AppImage path: build/iDescriptor-*.AppImage