Skip to content

Commit

Permalink
Merge pull request #69 from stefanb/ci-multiplatform
Browse files Browse the repository at this point in the history
Multiplatform CI build & test, +build tags: b_raylib,b_gtk
  • Loading branch information
refaktor authored Dec 17, 2023
2 parents 836ba6b + 710e106 commit fc59cf2
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ on:
jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- macos-latest
- ubuntu-latest
# - windows-latest
runs-on: ${{ matrix.image }}

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -23,15 +30,36 @@ jobs:
with:
go-version: '1.21'

- name: Install cgo dependancies
- name: Install Linux cgo dependancies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev # for webview
# webview https://github.com/webview/webview_go/blob/master/.github/workflows/ci.yaml
sudo apt-get install -y libwebkit2gtk-4.0-dev
# ebitengine: https://ebitengine.org/en/documents/install.html?os=linux#Debian_/_Ubuntu
# sudo apt-get install -y libc6-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev libasound2-dev pkg-config
# raylib: https://github.com/gen2brain/raylib-go/blob/master/.github/workflows/build.yml
sudo apt-get install -y libxi-dev libxinerama-dev libxcursor-dev libxrandr-dev libgl1-mesa-dev
# gtk: https://github.com/gotk3/gotk3/blob/master/.github/workflows/linux.yml
sudo apt-get install -y libgtk-3-dev libcairo2-dev libglib2.0-dev
- name: Install MacOS cgo dependancies
if: runner.os == 'macOS'
run: |
# b_gtk: https://github.com/gotk3/gotk3/blob/master/.github/workflows/macos.yml
brew install gobject-introspection gtk+3
- name: Build
# Enable all features for CI builds.
# TODO: add currently problematic tags: b_cayley,b_gtk,b_nng,b_qframe,b_raylib,b_ebitengine
run: go build -v -tags "b_sqlite,b_http,b_sql,b_postgres,b_bson,b_crypto,b_smtpd,b_mail,b_bcrypt,b_telegram,b_html,b_contrib,b_openai,b_email,b_mail,b_mysql,b_nats,b_psql,b_psutil,b_sxml,b_echo,b_webview" -o bin/rye
# TODO: add currently problematic tags: b_cayley,b_nng,b_qframe,b_ebitengine
run: |
go build -v -tags "b_sqlite,b_http,b_sql,b_postgres,b_bson,b_crypto,b_smtpd,b_mail,b_bcrypt,b_telegram,b_html,b_contrib,b_openai,b_email,b_mail,b_mysql,b_nats,b_psql,b_psutil,b_sxml,b_echo,b_webview,b_raylib,b_gtk" -o bin/rye
ls -l bin/rye
file bin/rye
go version -m bin/rye
- name: Run Rye Tests
run: cd tests ; ../bin/rye main.rye test
Expand Down

0 comments on commit fc59cf2

Please sign in to comment.