|
| 1 | +name: ci |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + schedule: |
| 8 | + cron: '00 01 * * *' |
| 9 | +jobs: |
| 10 | + test: |
| 11 | + name: test |
| 12 | + runs-on: ${{ matrix.os }} |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + # The docs seem to suggest that we can have a matrix with just an |
| 16 | + # include directive, but it result in a "matrix must define at least |
| 17 | + # one vector" error in the CI system. |
| 18 | + build: |
| 19 | + - pinned-glibc |
| 20 | + - pinned-musl |
| 21 | + - stable |
| 22 | + - beta |
| 23 | + # We test musl with nightly because every once in a while, this will |
| 24 | + # catch an upstream regression. |
| 25 | + - nightly-glibc |
| 26 | + - nightly-musl |
| 27 | + - macos |
| 28 | + - win-msvc-32 |
| 29 | + - win-msvc-64 |
| 30 | + - win-gnu-32 |
| 31 | + - win-gnu-64 |
| 32 | + include: |
| 33 | + # - build: pinned-glibc |
| 34 | + # os: ubuntu-18.04 |
| 35 | + # rust: 1.34.0 |
| 36 | + # target: x86_64-unknown-linux-gnu |
| 37 | + - build: pinned-musl |
| 38 | + os: ubuntu-18.04 |
| 39 | + rust: 1.34.0 |
| 40 | + target: x86_64-unknown-linux-musl |
| 41 | + - build: stable |
| 42 | + os: ubuntu-18.04 |
| 43 | + rust: stable |
| 44 | + target: x86_64-unknown-linux-gnu |
| 45 | + # - build: beta |
| 46 | + # os: ubuntu-18.04 |
| 47 | + # rust: beta |
| 48 | + # target: x86_64-unknown-linux-gnu |
| 49 | + # - build: nightly-glibc |
| 50 | + # os: ubuntu-18.04 |
| 51 | + # rust: nightly |
| 52 | + # target: x86_64-unknown-linux-gnu |
| 53 | + # - build: nightly-musl |
| 54 | + # os: ubuntu-18.04 |
| 55 | + # rust: nightly |
| 56 | + # target: x86_64-unknown-linux-musl |
| 57 | + # - build: macos |
| 58 | + # os: macOS-10.14 |
| 59 | + # rust: stable |
| 60 | + # target: x86_64-apple-darwin |
| 61 | + # - build: win-msvc-32 |
| 62 | + # os: windows-2019 |
| 63 | + # rust: stable |
| 64 | + # target: i686-pc-windows-msvc |
| 65 | + # - build: win-msvc-64 |
| 66 | + # os: windows-2019 |
| 67 | + # rust: stable |
| 68 | + # target: x86_64-pc-windows-msvc |
| 69 | + # - build: win-gnu-32 |
| 70 | + # os: windows-2019 |
| 71 | + # rust: stable-i686-gnu |
| 72 | + # target: i686-pc-windows-gnu |
| 73 | + # - build: win-gnu-64 |
| 74 | + # os: windows-2019 |
| 75 | + # rust: stable-x86_64-gnu |
| 76 | + # target: x86_64-pc-windows-gnu |
| 77 | + steps: |
| 78 | + - name: Checkout repository |
| 79 | + uses: actions/checkout@v1 |
| 80 | + with: |
| 81 | + fetch-depth: 1 |
| 82 | + - name: Install Rust |
| 83 | + uses: hecrj/setup-rust-action@v1 |
| 84 | + with: |
| 85 | + rust-version: ${{ matrix.rust }} |
| 86 | + - name: Install Rust Target |
| 87 | + run: rustup target add ${{ matrix.target }} |
| 88 | + - name: Install musl-gcc |
| 89 | + if: contains(matrix.target, 'musl') |
| 90 | + run: | |
| 91 | + apt-get install musl-tools |
| 92 | + - name: Build everything |
| 93 | + run: cargo build --verbose --target ${{ matrix.target }} --all --features pcre2 |
| 94 | + - name: Test zsh auto-completions |
| 95 | + if: matrix.build == 'stable' |
| 96 | + run: ./ci/test_complete.sh |
| 97 | + - name: Run tests |
| 98 | + run: cargo test --verbose --target ${{ matrix.target }} --all --features pcre2 |
0 commit comments