diff --git a/.github/workflows/crossbuild.yml b/.github/workflows/crossbuild.yml new file mode 100644 index 0000000..aeecd80 --- /dev/null +++ b/.github/workflows/crossbuild.yml @@ -0,0 +1,41 @@ +name: Cross-build openrsync +on: + push: + branches: ['*'] + pull_request: + types: [opened, reopened] +permissions: + contents: read +jobs: + build: + name: ${{ matrix.os }} (${{ matrix.compiler }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04, ubuntu-22.04, macos-lateset] + include: + - os: ubuntu-20.04 + compiler: clang-12 + pkgs: clang-12 lld-12 + - os: ubuntu-22.04 + compiler: clang-14 + pkgs: clang-14 lld-14 + - os: macos-latest + compiler: clang-13 + pkgs: llvm@13 + steps: + - uses: actions/checkout@v3 + - name: install packages (Ubuntu) + if: runner.os == 'Linux' + run: | + sudo apt-get update --quiet || true + sudo apt-get -yq --no-install-suggests --no-install-recommends install ${{ matrix.pkgs }} + - name: install packages (macOS) + if: runner.os == 'macOS' + run: | + brew update --quiet || true + brew install ${{ matrix.pkgs }} || true + - name: configure + run: ./configure + - name: build + run: make