summaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
blob: 8f4ab96d208dd6d5726b5ec7f5677e6860c8ac52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI

on:
  pull_request:
    types: [opened, synchronize, reopened]
  push:
    branches:
      - master

jobs:
  docker_linux_tier1:
    name: Docker Linux Tier1
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: true
      matrix:
        target: [
          i686-unknown-linux-gnu,
          x86_64-unknown-linux-gnu,
        ]
    steps:
      - uses: actions/checkout@v3
      - name: Setup Rust toolchain
        run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
      - name: Execute run-docker.sh
        run: LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }}

  macos:
    name: macOS
    runs-on: macos-11
    strategy:
      fail-fast: true
      matrix:
        target: [
          x86_64-apple-darwin,
        ]
    steps:
      - uses: actions/checkout@v3
      - name: Setup Rust toolchain
        run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
      - name: Execute run.sh
        run: LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }}

  windows:
    name: Windows
    runs-on: windows-2022
    env:
      OS: windows
    strategy:
      fail-fast: true
      matrix:
        include:
          - target: x86_64-pc-windows-gnu
            env:
              ARCH_BITS: 64
              ARCH: x86_64
          - target: x86_64-pc-windows-msvc
          # Disabled because broken:
          #  https://github.com/rust-lang/libc/issues/1592
          #- target: i686-pc-windows-gnu
          #  env:
          #    ARCH_BITS: 32
          #    ARCH: i686
          - target: i686-pc-windows-msvc
    steps:
      - uses: actions/checkout@v3
      - name: Self-update rustup
        run: rustup self update
        shell: bash
      - name: Setup Rust toolchain
        run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
        shell: bash
      - name: Execute run.sh
        run: LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }}
        shell: bash

  style_check:
    name: Style check
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v3
      - name: Setup Rust toolchain
        run: sh ./ci/install-rust.sh
      - name: Check style
        run: sh ci/style.sh