diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e4aded7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +on: + push: + pull_request: + +jobs: + linux: + name: ci + runs-on: ubuntu-latest + + container: + image: ubuntu:22.04 + + # don't run pull requests from local branches twice + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + + env: + DEBIAN_FRONTEND: noninteractive + + steps: + - name: Install packages + run: | + apt-get -q -y update + apt-get -q -y install build-essential cmake git + + - uses: actions/checkout@v3 + with: + submodules: 'true' + + - name: Build source + run: | + mkdir -p build + cd build + cmake .. + cmake --build . + DESTDIR=../out cmake --install . + + - uses: actions/upload-artifact@v3 + with: + name: cppdap + path: out/usr/local/ \ No newline at end of file