Skip to content

Commit

Permalink
Merge pull request #9 from pcwalton/add-basic-ci
Browse files Browse the repository at this point in the history
ci: Add basic CI with fmt and clippy for `cxx-async`
  • Loading branch information
Xuanwo authored Oct 22, 2024
2 parents 961dd10 + 7a8b601 commit 28dcb84
Show file tree
Hide file tree
Showing 12 changed files with 238 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# you probably want these overrides, so they're enabled by default.
CXX = "clang++"
CXXSTDLIB = "libc++"
CXXFLAGS = "-std=gnu++2a -fcoroutines-ts -stdlib=libc++"
#CXXFLAGS = "-std=gnu++2a -fcoroutines -stdlib=libc++"
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install deps
run: sudo apt-get install libfmt-dev libgflags-dev

- name: Format
run: cargo fmt --all -- --check

- name: Clippy
working-directory: cxx-async
run: cargo clippy -- -D warnings

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies on linux
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libfmt-dev libgflags-dev

- name: Build
working-directory: cxx-async
run: cargo build
Loading

0 comments on commit 28dcb84

Please sign in to comment.