name: Build and Cross-compile on: push: branches: - main - master tags: - 'v*' jobs: build: strategy: matrix: os: [ubuntu-latest, macos-latest] compiler: [clang] runs-on: ${{ matrix.os }} steps: - name: Checkout Repository uses: actions/checkout@v3 with: submodules: true ####################### # Ubuntu dependencies # ####################### - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | sudo apt update sudo apt install --no-install-recommends -y build-essential libboost-all-dev libssl-dev git ####################### # macOS dependencies # #BY VADE = https://github.com/MetanoicArmor ####################### - name: Install dependencies (macOS) if: matrix.os == 'macos-latest' run: | brew update brew install boost openssl@3 cmake make ####################### # Windows dependencies # ####################### # - name: Install MSYS2 (Windows) # if: matrix.os == 'windows-latest' ## uses: msys2/setup-msys2@v2 # with: # msystem: CLANG64 # install: base-devel git mingw-w64-x86_64-clang mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-miniupnpc # update: true - name: Initialize Git Submodules run: git submodule update --init --recursive ####################### # Build Project ####################### - name: Build Project (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | make -j$(nproc) make stripall make builddir - name: Build Project (macOS) if: matrix.os == 'macos-latest' run: | make HOMEBREW=1 -j8 make stripall make builddir # - name: Build Project (Windows) # if: matrix.os == 'windows-latest' ## shell: msys2 {0} # run: | # cd "${GITHUB_WORKSPACE}" # make -j$(nproc) # make stripall # make builddir ####################### # Upload binaries ####################### - name: Upload binaries uses: actions/upload-artifact@v4 with: name: my-binaries-${{ matrix.os }} path: build/*