feat: create async gem sample #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MacOS | |
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: | |
test-async: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ macos-13, macos-14 ] | |
steps: | |
- name: Select XCode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 15.0.1 | |
- name: Brew install | |
run: | | |
brew install bison flex binutils libffi double-conversion boost jemalloc fmt glog gnu-sed bash zlib ncurses | |
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH | |
- name: Install gem | |
run: gem install tebako | |
- name: Checkout sample | |
uses: actions/checkout@v4 | |
- name: Package | |
run: tebako press -e binance.rb -o binance.tebako -r async | |
- name: Start packaged application | |
run: ./async.tebako & | |
- name: Wait for app to start and do some work | |
run: sleep 10 | |
- name: End application | |
run: pkill -f async.tebako | |
test-sinatra: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ macos-13, macos-14 ] | |
steps: | |
- name: Select XCode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 15.0.1 | |
- name: Brew install | |
run: | | |
brew install bison flex binutils libffi double-conversion boost jemalloc fmt glog gnu-sed bash zlib ncurses | |
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH | |
- name: Install gem | |
run: gem install tebako | |
- name: Checkout sample | |
uses: actions/checkout@v4 | |
- name: Package | |
run: tebako press -e app.rb -o sinatra.tebako -r sinatra | |
- name: Smoke check | |
run: ./sinatra.tebako -h | |
- name: Start packaged Sinatra application | |
run: ./sinatra.tebako & | |
env: | |
PORT: 4567 | |
- name: Wait for Sinatra to start | |
run: sleep 10 | |
- name: Place GET request | |
run: curl http://localhost:4567 | |
- name: End Sinatra application | |
run: pkill -f sinatra.tebako | |
test-rails: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ macos-13, macos-14 ] | |
steps: | |
- name: Select XCode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 15.0.1 | |
- name: Brew install | |
run: | | |
brew install bison flex binutils libffi double-conversion boost jemalloc fmt glog gnu-sed bash zlib ncurses | |
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH | |
- name: Install gem | |
run: gem install tebako | |
- name: Checkout sample | |
uses: actions/checkout@v4 | |
- name: Package | |
run: tebako press -e bin/rails -o rails.tebako -r ror | |
- name: Create data folder | |
run: mkdir -p ror-data | |
- name: Test | |
run: ./rails.tebako server --help | |
- name: Start packaged Rails application | |
run: ./rails.tebako server --port=4567 --tebako-mount local/tmp:$PWD/ror-data/tmp --tebako-mount local/log:$PWD/ror-data/log & | |
- name: Wait for Rails to start | |
run: sleep 10 | |
- name: Place GET request | |
run: | | |
curl http://localhost:4567 | |
- name: End Rails application | |
run: pkill -f rails.tebako |