Skip to content

Commit

Permalink
Implement GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mikir committed Oct 20, 2023
1 parent 5a57892 commit 86f8394
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Linux

on:
push:
branches: [ master, '*-ci' ]
pull_request:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'

jobs:
build_linux:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: ["ubuntu-20.04", "ubuntu-22.04"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8

- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install virtualenv
- name: Build Zserio PyPi
run: scripts/build.sh

- name: Test Zserio PyPi
run: scripts/test.sh
env:
PYLINT_ENABLED: 1
MYPY_ENABLED: 1

- name: Archive Zserio PyPi binaries
uses: actions/upload-artifact@v3
with:
name: zserio-pypi-${{matrix.os}}
path: distr/*
56 changes: 56 additions & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Windows

on:
push:
branches: [ master, '*-ci' ]
pull_request:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'

jobs:
build_windows:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: ["windows-latest"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8

- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install virtualenv
- name: Build Zserio PyPi
run: scripts/build.sh
shell: bash

- name: Test Zserio PyPi
run: scripts/test.sh
env:
PYLINT_ENABLED: 1
MYPY_ENABLED: 1
shell: bash

- name: Archive Zserio PyPi binaries
uses: actions/upload-artifact@v3
with:
name: zserio-pypi-${{matrix.os}}
path: distr/*
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Zserio PyPi package

[![](https://github.com/ndsev/zserio-pypi/actions/workflows/build_linux.yml/badge.svg)](https://github.com/ndsev/zserio-pypi/actions/workflows/build_linux.yml)
[![](https://github.com/ndsev/zserio-pypi/actions/workflows/build_windows.yml/badge.svg)](https://github.com/ndsev/zserio-pypi/actions/workflows/build_windows.yml)
[![](https://img.shields.io/github/watchers/ndsev/zserio-pypi.svg)](https://GitHub.com/ndsev/zserio-pypi/watchers)
[![](https://img.shields.io/github/forks/ndsev/zserio-pypi.svg)](https://GitHub.com/ndsev/zserio-pypi/network/members)
[![](https://img.shields.io/github/stars/ndsev/zserio-pypi.svg?color=yellow)](https://GitHub.com/ndsev/zserio-pypi/stargazers)

--------

Zserio PyPi package contains Zserio compiler and Zserio Python runtime. Zserio is serialization framework
available at [GitHub](http://zserio.org).

Expand Down

0 comments on commit 86f8394

Please sign in to comment.