Skip to content

Add GitHub CI

Add GitHub CI #1

Workflow file for this run

name: CppSQLite CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build static library (CppSQLite3.o/CppSQLite3.obj)
run: |
c++ -c src/CppSQLite3.cpp -o CppSQLite3.o
- name: Build and run test program
if: runner.os != 'Windows'
run: |
c++ src/test.cpp src/CppSQLite3.cpp -lsqlite3 -o testprog
./testprog
shell: bash
# Windows expects .exe and uses different shell
if: runner.os == 'Windows'

Check failure on line 32 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CppSQLite CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yaml (Line: 32, Col: 7): 'if' is already defined .github/workflows/ci.yaml (Line: 33, Col: 7): 'run' is already defined
run: |
cl /EHsc /MD src/test.cpp src/CppSQLite3.cpp /I. /link sqlite3.lib
testprog.exe
shell: cmd