Skip to content

Commit

Permalink
ci: create github CI yaml file
Browse files Browse the repository at this point in the history
This file automatically triggers testing on github actions.

Signed-off-by: Pablo de Lara <[email protected]>
  • Loading branch information
pablodelara committed Mar 14, 2024
1 parent ddd75af commit 59a42bd
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Continous integration

on:
pull_request:
push:
branches:
- master
tags:
- "*"

permissions:
contents: read

jobs:
check_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 2
- name: Install indent
run: sudo apt install indent
- name: Run format check
run: bash tools/check_format.sh

run_tests_unix:
needs: check_format
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
assembler:
- nasm
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Install build dependencies (Linux)
run: sudo apt install ${{ matrix.assembler }}
if: runner.os == 'Linux'
- name: Install build dependencies (Macos)
run: brew install ${{ matrix.assembler }} automake autoconf coreutils libtool
if: runner.os == 'macOS'
- name: Build
run: |
./autogen.sh
./configure
bash -c 'make -j $(nproc)'
- name: Run tests
run: bash tools/test_checks.sh
- name: Run extended tests
run: bash tools/test_extended.sh
if: runner.os == 'Linux' # Fails on Mac OS due to nmake consistency issue

run_tests_windows:
needs: check_format
runs-on: windows-latest
steps:
- uses: actions/[email protected]
- name: Set MSVC developer prompt
uses: uses: ilammy/msvc-dev-cmd@24b406e1cf9f4be1e533ea9b71d098716183c026 # v1.6.0
- name: Install nasm
uses: ilammy/setup-nasm@9a15c8cb72fe84e3e00527b3014de04693cf60cf # v1.2.0
- name: Build
run: nmake -f Makefile.nmake

0 comments on commit 59a42bd

Please sign in to comment.