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 fa63ed3
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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/linux.sh g++-14
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/linux.sh clang++-18 -Wno-unqualified-std-cast-call
16 changes: 16 additions & 0 deletions ci/linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -euo pipefail

function main() {
local compiler="$1" ; shift 1
local checkout="$PWD"
mkdir "$checkout/build"
cd "$checkout/build"
local -a cxx_flags=(-fsanitize=address -fsanitize=undefined -fsanitize-undefined-trap-on-error "$@")
cmake .. -GNinja -DCMAKE_CXX_STANDARD=23 -DBUILD_TESTING=On -DCMAKE_CXX_FLAGS="${cxx_flags[*]}" -DCMAKE_CXX_COMPILER="$compiler"
cmake --build . -j$(nproc)
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 fa63ed3

Please sign in to comment.