Repository navigation
109 lines (103 loc) · 3.3 KB
/
Copy pathci.yml
File metadata and controls
109 lines (103 loc) · 3.3 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
ruby: "3.3"
- os: ubuntu-latest
ruby: "3.4"
- os: ubuntu-latest
ruby: "4.0"
- os: macos-latest
ruby: "4.0"
- os: windows-2025
ruby: "4.0"
defaults:
run:
working-directory: breadkit-render
steps:
- name: Checkout breadkit examples
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: breadkit/breadkit
ref: main
path: breadkit
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: breadkit-render
persist-credentials: false
- name: Install rasterizer (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y librsvg2-bin libvips-dev fonts-noto-cjk
working-directory: .
- name: Install rasterizer (macOS)
if: runner.os == 'macOS'
run: brew install librsvg vips
working-directory: .
- uses: ruby/setup-ruby@a0102e0972be65f351c307e2d64b9314a57c8073 # v1.324.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
working-directory: breadkit-render
- run: bundle exec rake
- name: Render core examples
if: runner.os != 'Windows'
run: |
mkdir -p /tmp/breadkit-render-examples
for file in ../breadkit/examples/*.bk.rb; do
name="${file##*/}"
bundle exec bkrender "$file" -o "/tmp/breadkit-render-examples/${name%.bk.rb}.png" --scale 2
done
package:
name: Strict gem build
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- run: node scripts/check-contrast.mjs
- uses: ruby/setup-ruby@a0102e0972be65f351c307e2d64b9314a57c8073 # v1.324.0
with:
ruby-version: "4.0"
bundler: default
- run: gem build --strict breadkit-render.gemspec
signatures:
name: RBS signatures
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: breadkit-render
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: breadkit/breadkit
ref: main
path: breadkit
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: breadkit-render
persist-credentials: false
- uses: ruby/setup-ruby@a0102e0972be65f351c307e2d64b9314a57c8073 # v1.324.0
with:
ruby-version: "4.0"
bundler: default
working-directory: breadkit-render
- run: gem install rbs --no-document # zizmor: ignore[adhoc-packages]
- run: rbs -I sig -I ../breadkit/sig validate