Skip to content

[WIP] SDL2 Renderer for tokamak #1533

[WIP] SDL2 Renderer for tokamak

[WIP] SDL2 Renderer for tokamak #1533

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
jobs:
swiftwasm_bundle_5_6:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: swiftwasm/[email protected]
with:
shell-action: carton bundle --product TokamakDemo
- name: Check binary size
shell: bash
run: |
ls -la Bundle
ls -lh Bundle/*.wasm | awk '{printf "::warning file=Sources/TokamakDemo/main.swift,line=1,col=1::TokamakDemo Wasm is %s.",$5}'
swiftwasm_test:
runs-on: ubuntu-20.04
strategy:
fail-fast: true
matrix:
include:
- { toolchain: wasm-5.6.0-RELEASE }
- { toolchain: wasm-5.7-SNAPSHOT-2022-07-27-a }
- { toolchain: wasm-DEVELOPMENT-SNAPSHOT-2022-07-23-a }
steps:
- uses: actions/checkout@v2
- run: echo "${{ matrix.toolchain }}" > .swift-version
- uses: swiftwasm/[email protected]
with:
shell-action: carton test --environment node
core_macos_build:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Run the test suite on macOS, build the demo project for iOS
shell: bash
run: |
set -ex
sudo xcode-select --switch /Applications/Xcode_13.4.app/Contents/Developer/
# avoid building unrelated products for testing by specifying the test product explicitly
swift build --product TokamakPackageTests
`xcrun --find xctest` .build/debug/TokamakPackageTests.xctest ||
(cp -r /var/folders/*/*/*/*Tests . ; exit 1)
rm -rf Sources/TokamakGTKCHelpers/*.c
xcodebuild -version
# Make sure Tokamak can be built on macOS so that Xcode autocomplete works.
xcodebuild -scheme TokamakDemo -destination 'generic/platform=macOS' \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | \
xcpretty --color
cd "NativeDemo"
xcodebuild -scheme iOS -destination 'generic/platform=iOS' \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | \
xcpretty --color
cd ..
./benchmark.sh
- name: Upload failed snapshots
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: Failed snapshots
path: '*Tests'
# FIXME: disabled due to build errors, to be investigated
# gtk_macos_build:
# runs-on: macos-12
#
# steps:
# - uses: actions/checkout@v2
# - name: Build the GTK renderer on macOS
# shell: bash
# run: |
# set -ex
# sudo xcode-select --switch /Applications/Xcode_13.4.1.app/Contents/Developer/
#
# brew install gtk+3
#
# make build
gtk_ubuntu_18_04_build:
runs-on: ubuntu-latest
container:
image: swiftlang/swift:nightly-5.7-bionic
steps:
- uses: actions/checkout@v2
- name: Build the GTK renderer on Ubuntu 18.04
shell: bash
run: |
set -ex
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential libgtk+-3.0 gtk+-3.0
make build
gtk_ubuntu_20_04_build:
runs-on: ubuntu-latest
container:
image: swiftlang/swift:nightly-5.7-focal
steps:
- uses: actions/checkout@v2
- name: Build the GTK renderer on Ubuntu 20.04
shell: bash
run: |
set -ex
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential libgtk+-3.0 gtk+-3.0
make build