diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 0000000..e8f82b1 --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,40 @@ +name: Ubuntu + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: dependencies + run: sudo apt-get install -y build-essential libboost-test-dev libboost-program-options-dev cmake zlib1g-dev libbz2-dev liblzma-dev libicu-dev uchardet libuchardet-dev libzip-dev wget + - name: cmake + run: | + cmake -E make_directory build + cd build + cmake .. + - name: Compile + working-directory: build + run: cmake --build . -j2 + - name: Unit Tests + working-directory: build + run: ctest -j2 + - name: Regression Tests + working-directory: tests + run: | + ../build/bin/warc2text \ + -f url,text,mime,html \ + -o output \ + hello-world.warc.gz + # ../build/bin/warc2text \ + # --json \ + # hello-world.warc.gz > hello-world.json + shasum -c checksums.txt diff --git a/tests/checksums.txt b/tests/checksums.txt new file mode 100644 index 0000000..4ed29f8 --- /dev/null +++ b/tests/checksums.txt @@ -0,0 +1,5 @@ +28d6c5e68f9e8c3275015ff1bd082fce3382441a hello-world.json +84a4f15ca77e1aafe8f33e5b94c6010e23cdf15b output/en/html.gz +8baa00c2a8c791da25c52a638711fc1692ef266f output/en/mime.gz +9728d8b84aca564f9f1907825711926b69e83028 output/en/text.gz +5a6bead02cc1b50ca216665a71146420d6c8bb55 output/en/url.gz diff --git a/tests/hello-world.json.expected b/tests/hello-world.json.expected new file mode 100644 index 0000000..9ff0d4c --- /dev/null +++ b/tests/hello-world.json.expected @@ -0,0 +1 @@ +{"f":"./hello-world.warc.gz","o":907,"s":723,"rs":11,"ps":12,"l":"en","u":"http://iipc.github.io/warc-specifications/primers/web-archive-formats/hello-world.txt","c":"text/plain","ts":"2015-07-08T21:55:13Z","p":"Hello World\n"} diff --git a/tests/hello-world.warc.gz b/tests/hello-world.warc.gz new file mode 100644 index 0000000..872d294 Binary files /dev/null and b/tests/hello-world.warc.gz differ