File: ci.yml

package info (click to toggle)
ruby-json 2.18.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,780 kB
  • sloc: ruby: 4,758; ansic: 4,290; java: 4,254; sh: 22; makefile: 11
file content (82 lines) | stat: -rw-r--r-- 2,243 bytes parent folder | download
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
name: CI

on:
- push
- pull_request
- workflow_dispatch

jobs:
  ruby-versions:
    uses: ruby/actions/.github/workflows/ruby_versions.yml@master
    with:
      engine: cruby-jruby
      min_version: 2.7

  host:
    needs: ruby-versions
    name: ${{ matrix.os }} ${{ matrix.ruby }} ${{ matrix.env }}
    runs-on: ${{ matrix.os }}
    env:
      BUNDLE_WITHOUT: release
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - macos-latest
          - windows-latest
        ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
        env:
          - ""
        include:
          - { os: ubuntu-24.04-arm, ruby: 3.4 }
          - { os: ubuntu-latest  , ruby: 3.4, env: "JSON_DISABLE_SIMD=1" }
          - { os: ubuntu-latest  , ruby: 3.4, env: "JSON_DEBUG=1" }
          - { os: macos-14, ruby: 3.4 }
          - { os: windows-latest , ruby: mswin     } # ruby/ruby windows CI
          - { os: macos-latest  , ruby: jruby-9.4 } # Ruby 3.1
          - { os: ubuntu-latest  , ruby: jruby-9.4 } # Ruby 3.1
          - { os: macos-latest   , ruby: truffleruby-head }
          - { os: ubuntu-latest  , ruby: truffleruby-head }
        exclude:
          - { os: windows-latest, ruby: jruby }

    steps:
      - uses: actions/checkout@v6

      - name: Set up Ruby
        uses: ruby/setup-ruby-pkgs@v1
        with:
          bundler-cache: true
          ruby-version: ${{ matrix.ruby }}
          apt-get: "${{ startsWith(matrix.ruby, 'jruby') && 'ragel' || '' }}"
          brew: "${{ startsWith(matrix.ruby, 'jruby') && 'ragel' || '' }}"

      - run: bundle exec rake compile ${{ matrix.env }}

      - run: bundle exec rake test JSON_COMPACT=1 ${{ matrix.env }}

      - run: bundle exec rake build

      - run: gem install pkg/*.gem
        if: ${{ matrix.ruby != '3.2' }}

  valgrind:
    name: Ruby memcheck
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false

    steps:
      - uses: actions/checkout@v6

      - name: Set up Ruby
        uses: ruby/setup-ruby-pkgs@v1
        with:
          bundler-cache: true
          ruby-version: "3.3"
          apt-get: valgrind

      - run: bundle exec rake compile

      - run: bundle exec rake valgrind JSON_COMPACT=1