Skip to content

Tebako tutorial. Part 1. #17

Tebako tutorial. Part 1.

Tebako tutorial. Part 1. #17

Workflow file for this run

name: Tutorial
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
concurrency:
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
cancel-in-progress: true
jobs:
lessons-1-2:
runs-on: macos-latest
steps:
- name: Brew install
run: |
pushd $(mktemp -d)
curl https://raw.githubusercontent.com/tamatebako/tebako/refs/heads/main/Brewfile > Brewfile
brew bundle -f
popd
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
- name: Install gem
run: gem install tebako
- name: Checkout
uses: actions/checkout@v4
- name: Package 1_hello_world
run: |
tebako press --root=tutorial/1_hello_world/hello_world.sample --entry=hello_world.rb
- name: Run packaged 1_hello_world application
run: |
./hello_world
otool -L hello_world
- name: Package 1_hello_world with a difefrent name
run: |
tebako press --root=tutorial/1_hello_world/hello_world.sample --entry=hello_world.rb --output=lesson-1
- name: Run packaged 1_hello_world application with a different name
run: |
./lesson-1
# Cannot run this sample since GH Actions does not allow such websocket connection to the outside world
- name: Package 2_packaging_scenarios gemspec and gemfile sample
run: |
tebako press -r tutorial/2_packaging_scenarios/gemspec_and_gemfile.sample -e tebako-table-cli -o table.tebako
- name: Run packaged 2_packaging_scenarios gemspec and gemfile sample
run: |
./table.tebako
- name: Package 2_packaging_scenarios gemfile sample
run: |
tebako press -r tutorial/2_packaging_scenarios/gemfile.sample -e ticker.rb -o ticker.tebako.
- name: Package 2_packaging_scenarios gemspec sample
run: |
tebako press -r tutorial/2_packaging_scenarios/gemspec.sample -e tebako-table-cli -o table.tebako
- name: Run packaged 2_packaging_scenarios gemspec sample
run: |
./table.tebako
- name: Package 2_packaging_scenarios gem sample
run: |
mkdir -p tutorial/2_packaging_scenarios/gem.sample
pushd tutorial/2_packaging_scenarios/gemspec.sample
gem build tebako-table.gemspec -o ../gem.sample/tebako-test-0.0.2.gem
popd
tebako press -r tutorial/2_packaging_scenarios/gem.sample -e tebako-table-cli -o table.tebako
- name: Run packaged 2_packaging_scenarios gems sample
run: |
./table.tebako