Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub CI #47

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions tests/checksums.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions tests/hello-world.json.expected
Original file line number Diff line number Diff line change
@@ -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"}
Binary file added tests/hello-world.warc.gz
Binary file not shown.