add github action
authorWolf Vollprecht <w.vollprecht@gmail.com>
Wed, 22 Dec 2021 18:04:04 +0000 (19:04 +0100)
committerWolf Vollprecht <w.vollprecht@gmail.com>
Tue, 4 Jan 2022 16:48:26 +0000 (17:48 +0100)
.github/environment.yml [new file with mode: 0644]
.github/workflows/main.yml [new file with mode: 0644]

diff --git a/.github/environment.yml b/.github/environment.yml
new file mode 100644 (file)
index 0000000..d8ada76
--- /dev/null
@@ -0,0 +1,11 @@
+name: zchunk_test_env
+channels:
+- conda-forge
+dependencies:
+- libcurl
+- zstd
+- meson
+- c-compiler
+- ninja
+- pkg-config
+- sel(osx): argp-standalone
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644 (file)
index 0000000..2600766
--- /dev/null
@@ -0,0 +1,35 @@
+name: CI
+on:
+  push:
+    branches:
+      - main
+  pull_request:
+    branches:
+      - main
+
+jobs:
+  test:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-latest, macos-latest]
+
+    name: Compile and Run Tests
+    steps:
+      - uses: actions/checkout@v2
+      - name: install mamba
+        uses: mamba-org/provision-with-micromamba@main
+        with:
+          environment-file: .github/environment.yml
+      - name: Compile zchunk
+        shell: bash -l {0}
+        run: |
+          meson builddir
+          cd builddir
+          ninja
+      - name: Run zchunk tests
+        shell: bash -l {0}
+        run: |
+          cd builddir
+          ninja test