Skip to content

Commit 0909b54

Browse files
committed
CI
1 parent 5f68b56 commit 0909b54

File tree

2 files changed

+63
-4
lines changed

2 files changed

+63
-4
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build and test extension
2+
3+
on:
4+
push:
5+
paths:
6+
- '.github/workflows/build-and-test-extension.yml'
7+
- 'ext/**'
8+
- 'lib/**'
9+
- 'Rakefile'
10+
- 'z80.gemspec'
11+
pull_request:
12+
paths:
13+
- '.github/workflows/build-and-test-extension.yml'
14+
- 'ext/**'
15+
- 'lib/**'
16+
- 'Rakefile'
17+
- 'z80.gemspec'
18+
19+
jobs:
20+
build-and-test-extension:
21+
runs-on: ${{matrix.os}}
22+
23+
strategy:
24+
matrix:
25+
os: [macos-latest, ubuntu-latest]
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
30+
- name: Set up Ruby
31+
uses: ruby/setup-ruby@v1
32+
with:
33+
ruby-version: '3.0'
34+
35+
- name: Install dependencies (macOS)
36+
if: startsWith(matrix.os, 'macos')
37+
run: brew install redcode/zxe/z80
38+
39+
- name: Install dependencies (Ubuntu)
40+
if: startsWith(matrix.os, 'ubuntu')
41+
run: |
42+
sudo mkdir -pm700 /root/.gnupg
43+
sudo mkdir -pm755 /etc/apt/keyrings
44+
sudo gpg --no-default-keyring --keyring /etc/apt/keyrings/zxe-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FE214A38D6A0C01D9AF514EE841EA3BD3A7E1487
45+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/zxe-archive-keyring.gpg] https://zxe.io/repos/apt stable main" | sudo tee /etc/apt/sources.list.d/zxe.list
46+
sudo apt-get update
47+
sudo apt-get -y install libz80-dev
48+
49+
- name: Build gem
50+
run: gem build z80.gemspec
51+
52+
- name: Install gem (macOS)
53+
if: startsWith(matrix.os, 'macos')
54+
run: gem install z80*.gem -- --with-Z80-dir=$(brew --prefix)
55+
56+
- name: Install gem (Ubuntu)
57+
if: startsWith(matrix.os, 'ubuntu')
58+
run: gem install z80*.gem

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Z80-Ruby
22

33
[![](https://zxe.io/software/Z80-Ruby/assets/images/gem-badge)](https://zxe.io/software/Z80-Ruby/gem)
4+
[![](https://github.com/redcode/Z80-Ruby/actions/workflows/build-and-test-extension.yml/badge.svg)](https://github.com/redcode/Z80-Ruby/actions/workflows/build-and-test-extension.yml)
45
[![](https://zxe.io/software/Z80/assets/images/chat-badge)](https://zxe.io/software/Z80/chat)
56

67
Ruby binding for the [Z80](https://github.com/redcode/Z80) library.
@@ -93,9 +94,9 @@ ARGV.each do |file_path|
9394
end
9495
```
9596

96-
<sup>**[<sub><img src="https://zxe.io/software/Z80-Ruby/assets/images/ruby-icon.svg" height="14"></sub> run-yaze-zex.rb](https://zxe.io/software/Z80-Ruby/scripts/run-yaze-zex.rb)**</sup>
97+
<sup>**[<sub><img src="https://zxe.io/software/Z80-Ruby/assets/images/rb.svg" height="14"></sub> run-yaze-zex.rb](https://zxe.io/software/Z80-Ruby/scripts/run-yaze-zex.rb)**</sup>
9798

98-
Give it a try:
99+
Want to try it? Use this:
99100

100101
```
101102
curl ftp://ftp.ping.de/pub/misc/emulators/yaze-1.14.tar.gz | tar -xOzf- yaze-1.14/test/zexall.com | ruby -e'eval `curl https://zxe.io/software/Z80-Ruby/scripts/run-yaze-zex.rb`' -
@@ -192,9 +193,9 @@ ARGV.each do |file_path|
192193
end
193194
```
194195

195-
<sup>**[<sub><img src="https://zxe.io/software/Z80-Ruby/assets/images/ruby-icon.svg" height="14"></sub> run-raxoft-z80test.rb](https://zxe.io/software/Z80-Ruby/scripts/run-raxoft-z80test.rb)**</sup>
196+
<sup>**[<sub><img src="https://zxe.io/software/Z80-Ruby/assets/images/rb.svg" height="14"></sub> run-raxoft-z80test.rb](https://zxe.io/software/Z80-Ruby/scripts/run-raxoft-z80test.rb)**</sup>
196197

197-
Give it a try:
198+
Want to try it? Use this:
198199

199200
```shell
200201
curl http://zxds.raxoft.cz/taps/misc/z80test-1.2a.zip | bsdtar -xOf- z80test-1.2a/z80full.tap | ruby -e'eval `curl https://zxe.io/software/Z80-Ruby/scripts/run-raxoft-z80test.rb`' -

0 commit comments

Comments
 (0)