Browse Source

CI & test suite! (#59)

Set up Github CI
Mobin Aydinfar 1 year ago
parent
commit
6fb851dbf7

+ 33 - 0
.github/workflows/alpine-latest-aarch64.yml

@@ -0,0 +1,33 @@
+name: Dinit on alpine-latest-aarch64 CI
+
+on:
+  push:
+    branches: [ "master" ]
+  pull_request:
+    branches: [ "master" ]
+
+jobs:
+  Alpine-latest-aarch64_build:
+
+    runs-on: ubuntu-latest
+      
+    steps:
+    - uses: actions/checkout@v3
+    - uses: uraimo/run-on-arch-action@v2
+      name: Getting depends & configure & build & unit tests
+      with:
+        arch: aarch64
+        distro: alpine_latest
+        run: | 
+          apk update
+          apk add make
+          apk add g++
+          apk add m4
+          g++ -dumpmachine
+          chmod +x ./configs/mconfig.Linux.sh
+          ./configs/mconfig.Linux.sh
+          make
+          apk add file
+          file ./src/dinit
+          export LSAN_OPTIONS=verbosity=1:log_threads=1
+          make check

+ 33 - 0
.github/workflows/alpine-latest-armv6.yml

@@ -0,0 +1,33 @@
+name: Dinit on alpine-latest-armv6 CI
+
+on:
+  push:
+    branches: [ "master" ]
+  pull_request:
+    branches: [ "master" ]
+
+jobs:
+  Alpine-latest-armv6_build:
+
+    runs-on: ubuntu-latest
+      
+    steps:
+    - uses: actions/checkout@v3
+    - uses: uraimo/run-on-arch-action@v2
+      name: Getting depends & configure & build & unit tests
+      with:
+        arch: armv6
+        distro: alpine_latest
+        run: | 
+          apk update
+          apk add make
+          apk add g++
+          apk add m4
+          g++ -dumpmachine
+          chmod +x ./configs/mconfig.Linux.sh
+          ./configs/mconfig.Linux.sh
+          make
+          apk add file
+          file ./src/dinit
+          export LSAN_OPTIONS=verbosity=1:log_threads=1
+          make check

+ 33 - 0
.github/workflows/alpine-latest-armv7.yml

@@ -0,0 +1,33 @@
+name: Dinit on alpine-latest-armv7 CI
+
+on:
+  push:
+    branches: [ "master" ]
+  pull_request:
+    branches: [ "master" ]
+
+jobs:
+  Alpine-latest-armv7_build:
+
+    runs-on: ubuntu-latest
+      
+    steps:
+    - uses: actions/checkout@v3
+    - uses: uraimo/run-on-arch-action@v2
+      name: Getting depends & configure & build & unit tests
+      with:
+        arch: armv7
+        distro: alpine_latest
+        run: | 
+          apk update
+          apk add make
+          apk add g++
+          apk add m4
+          g++ -dumpmachine
+          chmod +x ./configs/mconfig.Linux.sh
+          ./configs/mconfig.Linux.sh
+          make
+          apk add file
+          file ./src/dinit
+          export LSAN_OPTIONS=verbosity=1:log_threads=1
+          make check

+ 36 - 0
.github/workflows/debian-bullseye-amd64.yml

@@ -0,0 +1,36 @@
+name: Dinit on debian-bullseye-amd64 CI
+
+on:
+  push:
+    branches: [ "master" ]
+  pull_request:
+    branches: [ "master" ]
+
+jobs:
+  Debian-bullseye-amd64_build:
+
+    runs-on: ubuntu-latest
+    container:
+      image: debian:bullseye
+
+    steps:
+    - uses: actions/checkout@v3
+    - name: Getting depends
+      run: apt-get update && apt-get install gcc make m4 g++ -y
+    - name: Print g++ arch
+      run: g++ -dumpmachine
+    - name: chmod +x configure
+      run: chmod +x ./configs/mconfig.Linux.sh
+    - name: configure
+      run: ./configs/mconfig.Linux.sh
+    - name: Build
+      run: make
+    - name: Install "file" package via apt-get
+      run: apt-get install file -y
+    - name: Print compiled file arch
+      run: file ./src/dinit
+    - name: Unit tests
+      run: make check
+## Integration tests disabled due some bugs
+#    - name: Integration tests
+#      run: make check-igr

+ 38 - 0
.github/workflows/debian-bullseye-i386.yml

@@ -0,0 +1,38 @@
+name: Dinit on debian-bullseye-i386 CI
+
+on:
+  push:
+    branches: [ "master" ]
+  pull_request:
+    branches: [ "master" ]
+
+jobs:
+  Debian-bullseye-i386_build:
+
+    runs-on: ubuntu-latest
+    container:
+      image: debian:bullseye
+
+    steps:
+    - uses: actions/checkout@v3
+    - name: Add 32-bit repos
+      run: dpkg --add-architecture i386
+    - name: Getting depends
+      run: apt-get update && apt-get install gcc:i386 make:i386 m4:i386 g++:i386 -y
+    - name: Print g++ architecture
+      run: g++ -dumpmachine
+    - name: chmod +x configure
+      run: chmod +x ./configs/mconfig.Linux.sh
+    - name: configure
+      run: ./configs/mconfig.Linux.sh
+    - name: Build
+      run: make
+    - name: Install "file" package via apt-get
+      run: apt-get install file -y
+    - name: Print dinit exec architecture
+      run: file ./src/dinit
+    - name: Unit tests
+      run: make check
+## Integration tests disabled due some bugs
+#    - name: Integration tests
+#      run: make check-igr

+ 1 - 0
CONTRIBUTORS

@@ -4,3 +4,4 @@ The following people have contributed:
  * Daniel Kolesa - Code, testing, documentation.
  * Edd Barrett - Testing, documentation.
  * Fabien Poussin - Code, services, documentation.
+ * Mobin Aydinfar - CI