diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 920d12a..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-20.04 - strategy: - matrix: - cc: [ clang, gcc ] - steps: - - uses: actions/checkout@v2 - - name: Build - run: env CFLAGS="-Wpedantic -Wall -Werror" cmake -B build && make -C build - env: - CC: /usr/bin/${{ matrix.cc }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2386d63 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Test + +on: + push: + pull_request: + branches: [master] + +jobs: + build-test: + runs-on: ubuntu-20.04 + strategy: + matrix: + cc: [clang, gcc] + steps: + - uses: actions/checkout@v2 + - name: Build + run: cmake -B build && make -C build + env: + CC: /usr/bin/${{ matrix.cc }} + CFLAGS: "-Wpedantic -Wall -Werror" + run-test: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Build + run: cmake -B build && make -C build + - name: Test + run: cd build && ctest diff --git a/format.sh b/format.sh index 101c3d9..01f9cf8 100755 --- a/format.sh +++ b/format.sh @@ -3,3 +3,4 @@ clang-format -i {utility,espresso}/*.{h,c} cmake-format -i CMakeLists.txt shfmt -i 4 -w format.sh +prettier --write .github/workflows/*