Skip to content

Commit

Permalink
wip ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ednolan committed Aug 23, 2024
1 parent 83c26bf commit 04c5031
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches:
- ci
pull_request:
branches:
- ci

jobs:
gcc-linux:
runs-on: ubuntu-latest
container:
image: ghcr.io/ednolan/ubuntu24.10_gcc14.2.0
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run
run: |
./ci.sh -fsanitize=address -fsanitize=undefined -fsanitize-undefined-trap-on-error
clang-linux:
runs-on: ubuntu-latest
container:
image: ghcr.io/ednolan/ubuntu24.10_clang18.1.8
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run
run: |
./ci.sh -fsanitize=address -fsanitize=undefined -fsanitize-undefined-trap-on-error -Wno-unqualified-std-cast-call
msvc-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run
shell: bash
run: |
./ci.sh
15 changes: 15 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -euo pipefail

function main() {
local -a cxx_flags=("$@")
local checkout="$PWD"
mkdir "$checkout/build"
cd "$checkout/build"
cmake .. -GNinja -DCMAKE_CXX_STANDARD=23 -DBUILD_TESTING=On -DCMAKE_CXX_FLAGS="${cxx_flags[*]}"
cmake --build . --parallel
ctest
}

main "$@"
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[![CI](https://github.com/ednolan/utfview/actions/workflows/ci.yml/badge.svg)](https://github.com/ednolan/utfview/actions)

0 comments on commit 04c5031

Please sign in to comment.