diff mbox series

[1/3] ci: Add github workflow

Message ID 20240709044758.67725-2-lucas.de.marchi@gmail.com (mailing list archive)
State Handled Elsewhere
Headers show
Series Use github-action for CI | expand

Commit Message

Lucas De Marchi July 9, 2024, 4:47 a.m. UTC
Add a minimal github workflow to test kmod. This can be incremented in
future to test more distros, compilers and libc.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
---
 .github/workflows/main.yml | 49 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 .github/workflows/main.yml

Comments

Lucas De Marchi July 9, 2024, 5:07 a.m. UTC | #1
On Mon, Jul 08, 2024 at 11:47:56PM GMT, Lucas De Marchi wrote:
>Add a minimal github workflow to test kmod. This can be incremented in
>future to test more distros, compilers and libc.
>
>Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
>---
> .github/workflows/main.yml | 49 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
> create mode 100644 .github/workflows/main.yml
>
>diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
>new file mode 100644
>index 0000000..f366846
>--- /dev/null
>+++ b/.github/workflows/main.yml
>@@ -0,0 +1,49 @@
>+name: Build and Test
>+
>+on:
>+  push:
>+    branches: [ci-test]

oops, I was using this for testing... need to replace with [master]

Lucas De Marchi
diff mbox series

Patch

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..f366846
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,49 @@ 
+name: Build and Test
+
+on:
+  push:
+    branches: [ci-test]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+
+      - name: install dependencies
+        run: |
+          sudo apt-get update
+          sudo apt-get install --yes \
+            build-essential \
+            autoconf \
+            automake \
+            gtk-doc-tools \
+            libssl-dev \
+            liblzma-dev \
+            libssl-dev \
+            libtool \
+            libzstd-dev \
+            linux-headers-generic \
+            scdoc \
+            zstd \
+
+      - name: configure
+        run: |
+          mkdir build
+          cd build
+          ../autogen.sh c
+
+      - name: build
+        run: |
+          cd build
+          make -j$(nproc)
+
+      - name: test
+        run: |
+          cd build
+          make -j$(nproc) check
+
+      - name: install
+        run: |
+          cd build
+          DESTDIR=$PWD/inst make install