Skip to content

CI

CI #2197

Workflow file for this run

name: CI
on:
push:
branches: [ main, taika-dev ]
pull_request:
branches: [ main, taika-dev ]
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
env:
COTOWALI_HASH: "${{ github.sha }}"
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: zakuro9715/setup-z@main
- uses: actions/checkout@v2
- run: z ci setup-v
- run: z ci format
test:
runs-on: ubuntu-latest
strategy:
matrix:
cc: [clang, gcc]
test_arg: ['', 'pwsh', 'himorogi']
env:
VFLAGS: "-cc ${{ matrix.cc }}"
steps:
- uses: zakuro9715/setup-z@main
- uses: actions/checkout@v2
- run: sudo apt install libgc-dev
- run: z ci setup-v
- run: z build
- run: z ci test ${{ matrix.test_arg }}
test-alpine:
runs-on: ubuntu-latest
env:
VFLAGS: "-cc clang"
steps:
- uses: zakuro9715/setup-z@main
- uses: actions/checkout@v2
- run: z ci setup-v
- run: z test compile
- run: docker run -v $(pwd):/app/cotowali -w /app/cotowali alpine ./tests/run.sh
test-busybox:
runs-on: ubuntu-latest
env:
VFLAGS: "-cc clang"
steps:
- uses: zakuro9715/setup-z@main
- uses: actions/checkout@v2
- run: z ci setup-v
- run: z test compile
- run: docker run -v $(pwd):/app/cotowali -w /app/cotowali busybox ./tests/run.sh
test-macos:
runs-on: macos-latest
strategy:
matrix:
test_arg: ['', 'himorogi']
env:
VFLAGS: "-cc clang"
steps:
- uses: zakuro9715/setup-z@main
- uses: actions/checkout@v2
- run: z ci setup-v
- run: z build
- run: z ci test ${{ matrix.test_arg }}
# shellcheck:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# cc: [clang, gcc]
# env:
# VFLAGS: "-cc ${{ matrix.cc }}"
# steps:
# - uses: zakuro9715/setup-z@main
# - uses: actions/checkout@v2
# - run: z ci setup-v
# - run: z ci test shellcheck
build-konryu:
runs-on: ubuntu-latest
env:
VFLAGS: "-cc clang"
steps:
- uses: zakuro9715/setup-z@main
- uses: actions/checkout@v2
- run: z ci setup-v
- run: z lic build
- uses: actions/checkout@v2
with:
repository: cotowali/konryu
path: konryu
- run: ./bin/lic konryu/konryu.li
publish-dev-image:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: zakuro9715/setup-z@main
- uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: z publish