Skip to content

Commit c2620c8

Browse files
authored
Merge pull request #5 from pusewicz/split-workflows
Split workflows
2 parents 6246958 + 1d97bb1 commit c2620c8

File tree

3 files changed

+79
-30
lines changed

3 files changed

+79
-30
lines changed

.github/workflows/benchmark.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Benchmark
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
schedule:
10+
- cron: "0 0 * * *"
11+
12+
permissions:
13+
contents: write
14+
deployments: write
15+
pull-requests: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
name: Ruby ${{ matrix.ruby }}
21+
strategy:
22+
matrix:
23+
ruby:
24+
- "3.3.0"
25+
26+
steps:
27+
- name: Install sdl
28+
run: sudo apt-get install libsdl2-dev -y
29+
- uses: actions/checkout@v4
30+
- name: Set up Ruby
31+
uses: ruby/setup-ruby@v1
32+
with:
33+
ruby-version: ${{ matrix.ruby }}
34+
bundler-cache: true
35+
- name: Run benchmark
36+
run: bundle exec bin/benchmark | tee output.txt
37+
- name: Download previous benchmark data
38+
uses: actions/cache@v4
39+
with:
40+
path: ./cache
41+
key: ${{ runner.os }}-benchmark
42+
- name: Store benchmark result
43+
uses: benchmark-action/github-action-benchmark@v1
44+
with:
45+
tool: "customSmallerIsBetter"
46+
output-file-path: output.txt
47+
external-data-json-path: ./cache/benchmark-data.json
48+
fail-on-alert: true
49+
# GitHub API token to make a commit comment
50+
github-token: ${{ secrets.GITHUB_TOKEN }}
51+
# Enable alert commit comment
52+
comment-on-alert: true
53+
# Mention @pusewicz in the commit comment
54+
alert-comment-cc-users: "@pusewicz"
55+
summary-always: true

.github/workflows/contributors.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Contributors
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
deployments: write
11+
pull-requests: write
12+
13+
jobs:
14+
contrib-readme-job:
15+
runs-on: ubuntu-latest
16+
name: Automate contributors list in README
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
steps:
21+
- name: Contribute List
22+
uses: akhilmhdh/[email protected]
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/main.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,3 @@ jobs:
3232
bundler-cache: true
3333
- name: Run the default task
3434
run: bundle exec rake
35-
- name: Run benchmark
36-
run: bundle exec bin/benchmark | tee output.txt
37-
- name: Download previous benchmark data
38-
uses: actions/cache@v4
39-
with:
40-
path: ./cache
41-
key: ${{ runner.os }}-benchmark
42-
- name: Store benchmark result
43-
uses: benchmark-action/github-action-benchmark@v1
44-
with:
45-
tool: "customSmallerIsBetter"
46-
output-file-path: output.txt
47-
external-data-json-path: ./cache/benchmark-data.json
48-
fail-on-alert: true
49-
# GitHub API token to make a commit comment
50-
github-token: ${{ secrets.GITHUB_TOKEN }}
51-
# Enable alert commit comment
52-
comment-on-alert: true
53-
# Mention @pusewicz in the commit comment
54-
alert-comment-cc-users: "@pusewicz"
55-
summary-always: true
56-
57-
contrib-readme-job:
58-
runs-on: ubuntu-latest
59-
name: Automate contributors list in README
60-
steps:
61-
- name: Contribute List
62-
uses: akhilmhdh/[email protected]
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)