diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85441ffe..d4051c28 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,44 +2,72 @@ name: CI on: push: - branches: ['main'] pull_request: + workflow_dispatch: merge_group: types: [checks_requested] + schedule: + # Runs at 02:30, every Saturday + - cron: "30 2 * * 6" + jobs: Test: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + toolchain: [stable, nightly] + platform: + # native targets + - { target: aarch64-apple-darwin, os: macos-14, native: true } + - { target: x86_64-apple-darwin, os: macos-13, native: true } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, native: true } + - { target: x86_64-pc-windows-msvc, os: windows-latest, native: true } + # arm64 linux + - { target: aarch64-unknown-linux-gnu, os: ubuntu-latest, native: false } + # all servo's android targets + - { target: aarch64-linux-android, os: ubuntu-latest, native: false } + - { target: armv7-linux-androideabi, os: ubuntu-latest, native: false } + - { target: i686-linux-android, os: ubuntu-latest, native: false } + - { target: x86_64-linux-android, os: ubuntu-latest, native: false } + runs-on: ${{ matrix.platform.os }} env: HARFBUZZ_SYS_NO_PKG_CONFIG: true steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@v1 with: - toolchain: stable - override: true - profile: minimal - + toolchain: ${{ matrix.toolchain }} + target: ${{ matrix.platform.target }} + - uses: libsdl-org/setup-sdl@main + if: ${{ matrix.platform.os == 'windows-latest' }} + with: + install-linux-dependencies: true + add-to-environment: true + version: 2-latest + version-sdl-image: 2-latest - name: Install packages + if: ${{ matrix.platform.os == 'ubuntu-latest' }} run: | sudo apt-get update sudo apt-get install -y libegl1-mesa-dev libgtk-3-dev libsdl2-dev cmake - - - name: Install rustc target - run: rustup target add aarch64-unknown-linux-gnu - - - name: Build arm64 simd - run: cargo build --target aarch64-unknown-linux-gnu + + - name: Build simd + if: ${{ !matrix.platform.native }} + run: cargo build --target ${{ matrix.platform.target }} working-directory: simd - - name: Build arm64 geometry - run: cargo build --target aarch64-unknown-linux-gnu + - name: Build geometry + if: ${{ !matrix.platform.native }} + run: cargo build --target ${{ matrix.platform.target }} working-directory: geometry - name: Build - run: cargo build + if: ${{ matrix.platform.native }} + run: cargo build --target ${{ matrix.platform.target }} - name: Test + if: ${{ matrix.platform.native }} run: cargo test build_result: