summaryrefslogtreecommitdiff
path: root/.github/workflows/wsl.yml
blob: 640f18ce42e876ca1cbb2fce3416942a0333c9a8 (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
name: Ubuntu on WSL

on:
  push:
    paths-ignore:
      - 'doc/**'
      - '**/man/*'
      - '**.md'
      - '**.rdoc'
      - '**/.document'
      - '.*.yml'
  pull_request:
    # Do not use paths-ignore for required status checks
    # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
  merge_group:

jobs:
  wsl:
    runs-on: windows-2025

    if: >-
      ${{!(false
      || contains(github.event.head_commit.message, '[DOC]')
      || contains(github.event.pull_request.title, '[DOC]')
      || contains(github.event.pull_request.labels.*.name, 'Documentation')
      || (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]')
      )}}

    steps:
      - name: Install or update WSL
        uses: Ubuntu/WSL/.github/actions/wsl-install@main
        with:
          distro: Ubuntu-24.04

      - name: Install dependencies
        uses: Ubuntu/WSL/.github/actions/wsl-bash@main
        with:
         distro: Ubuntu-24.04
         working-dir: /tmp/github/
         exec: |
            DEBIAN_FRONTEND=noninteractive sudo apt update
            DEBIAN_FRONTEND=noninteractive sudo apt install -y ruby build-essential autoconf libssl-dev libyaml-dev zlib1g-dev libgmp-dev libffi-dev

      - name: Check out the repository
        uses: Ubuntu/WSL/.github/actions/wsl-checkout@main
        with:
          distro: Ubuntu-24.04
          working-dir: /tmp/github/
          submodules: true

      - name: Build
        uses: Ubuntu/WSL/.github/actions/wsl-bash@main
        with:
         distro: Ubuntu-24.04
         working-dir: /tmp/github/
         exec: |
            ./autogen.sh
            ./configure --disable-install-doc
            make ruby -j4
            make extract-gems
            make -j4

      - name: Test
        uses: Ubuntu/WSL/.github/actions/wsl-bash@main
        with:
         distro: Ubuntu-24.04
         working-dir: /tmp/github/
         exec: |
            ./ruby -v
            # make check TESTS="-j4" MSPECOPT="-j"