Build gaster #122
This file contains hidden or 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 gaster | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| schedule: | |
| - cron: "0 0 * * 0" | |
| jobs: | |
| build-libusb-linux: | |
| strategy: | |
| matrix: | |
| arch: | |
| - runner: ubuntu-22.04 | |
| name: x86_64 | |
| - runner: ubuntu-22.04-arm | |
| name: aarch64 | |
| name: build-libusb-linux-${{ matrix.arch.name }} | |
| runs-on: ${{ matrix.arch.runner }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y aria2 libusb-1.0-0-dev clang lld | |
| sudo apt remove -y libssl-dev libusb-1.0-0-dev | |
| aria2c https://www.openssl.org/source/openssl-1.1.1w.tar.gz | |
| tar -zxvf openssl-1.1.1w.tar.gz | |
| cd openssl-1.1.1w | |
| if [[ $(uname -m) == "a"* && $(getconf LONG_BIT) == 64 ]]; then | |
| ./Configure no-ssl3-method linux-aarch64 "-Wa,--noexecstack -fPIC" | |
| else | |
| ./Configure no-ssl3-method enable-ec_nistp_64_gcc_128 linux-x86_64 "-Wa,--noexecstack -fPIC" | |
| fi | |
| make depend -j4 | |
| make -j4 | |
| sudo make install_sw install_ssldirs | |
| sudo rm -rf /usr/local/lib/libcrypto.so* /usr/local/lib/libssl.so* | |
| cd .. | |
| aria2c https://github.com/libusb/libusb/releases/download/v1.0.28/libusb-1.0.28.tar.bz2 | |
| tar -xf libusb-1.0.28.tar.bz2 | |
| cd libusb-1.0.28 | |
| ./configure --disable-shared --enable-static --disable-udev LDFLAGS="-static" | |
| make -j$(nproc) | |
| sudo make install | |
| cd .. | |
| - name: run make | |
| run: make libusb -j$(nproc) LDFLAGS="-L/usr/local/lib -fuse-ld=lld" CC=clang LIBS="-ldl -lusb-1.0 -pthread -lcrypto" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gaster-Linux-${{ matrix.arch.name }} | |
| path: gaster | |
| if-no-files-found: warn | |
| retention-days: 90 | |
| build-macOS: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: make macos -j$(sysctl -n hw.ncpu) | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gaster-Darwin | |
| path: gaster | |
| if-no-files-found: warn | |
| retention-days: 90 | |
| build-ios: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: make ios -j$(sysctl -n hw.ncpu) | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gaster-iOS | |
| path: gaster | |
| if-no-files-found: warn | |
| retention-days: 99 |