]> granicus.if.org Git - libmatroska/commitdiff
CI: add a basic compilation test
authorSteve Lhomme <slhomme@matroska.org>
Sun, 25 Sep 2022 05:41:50 +0000 (07:41 +0200)
committerSteve Lhomme <robux4@ycbcr.xyz>
Sun, 25 Sep 2022 11:59:15 +0000 (13:59 +0200)
It needs to build libebml first.

.github/workflows/linux-gcc10.yaml [new file with mode: 0644]
.github/workflows/linux.yaml [new file with mode: 0644]
.github/workflows/macos.yaml [new file with mode: 0644]
.github/workflows/windows.yaml [new file with mode: 0644]
README.md

diff --git a/.github/workflows/linux-gcc10.yaml b/.github/workflows/linux-gcc10.yaml
new file mode 100644 (file)
index 0000000..105f544
--- /dev/null
@@ -0,0 +1,47 @@
+name: "Linux gcc10 Build"\r
+on:\r
+  push:\r
+    branches: [ master ]\r
+  pull_request:\r
+    # branches: [ master ]\r
+\r
+jobs:\r
+  build_libmatroska:\r
+    name: libmatroska for Linux gcc10\r
+    runs-on: ubuntu-latest\r
+    steps:\r
+      - uses: lukka/get-cmake@latest\r
+\r
+      - name: Get pushed code\r
+        uses: actions/checkout@v3\r
+      \r
+      - name: Checkout libebml\r
+        uses: actions/checkout@v3\r
+        with: \r
+          repository: Matroska-Org/libebml\r
+          path: libebml\r
+          # minimum version we support ref: 'release-1.4.3'\r
+\r
+      - name: Configure libebml\r
+        run: cmake -S libebml -B libebml/_build\r
+        env:\r
+          CC:  gcc-10\r
+          CXX: g++-10\r
+\r
+      - name: Build libebml\r
+        run: cmake --build libebml/_build --parallel\r
+\r
+      - name: Install libebml\r
+        run: cmake --install libebml/_build --prefix ${GITHUB_WORKSPACE}/_built\r
+\r
+      - name: Configure CMake\r
+        run: cmake -S . -B _build -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML"\r
+        env:\r
+          CC:  gcc-10\r
+          CXX: g++-10\r
+\r
+      - name: Build with CMake\r
+        run: cmake --build _build --parallel\r
+\r
+      - name: Test installation\r
+        run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built\r
diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml
new file mode 100644 (file)
index 0000000..bacc280
--- /dev/null
@@ -0,0 +1,41 @@
+name: "Linux Build"\r
+on:\r
+  push:\r
+    branches: [ master ]\r
+  pull_request:\r
+    # branches: [ master ]\r
+\r
+jobs:\r
+  build_libmatroska:\r
+    name: libmatroska for Linux\r
+    runs-on: ubuntu-latest\r
+    steps:\r
+      - uses: lukka/get-cmake@latest\r
+\r
+      - name: Get pushed code\r
+        uses: actions/checkout@v3\r
+      \r
+      - name: Checkout libebml\r
+        uses: actions/checkout@v3\r
+        with: \r
+          repository: Matroska-Org/libebml\r
+          path: libebml\r
+          # minimum version we support ref: 'release-1.4.3'\r
+\r
+      - name: Configure libebml\r
+        run: cmake -S libebml -B libebml/_build\r
+\r
+      - name: Build libebml\r
+        run: cmake --build libebml/_build --parallel\r
+\r
+      - name: Install libebml\r
+        run: cmake --install libebml/_build --prefix ${GITHUB_WORKSPACE}/_built\r
+\r
+      - name: Configure CMake \r
+        run: cmake -S . -B _build -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML"\r
+\r
+      - name: Build with CMake\r
+        run: cmake --build _build --parallel\r
+\r
+      - name: Test installation\r
+        run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built\r
diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml
new file mode 100644 (file)
index 0000000..934a720
--- /dev/null
@@ -0,0 +1,41 @@
+name: "macOS Build"\r
+on:\r
+  push:\r
+    branches: [ master ]\r
+  pull_request:\r
+    # branches: [ master ]\r
+\r
+jobs:\r
+  build_libmatroska:\r
+    name: libmatroska for macOS\r
+    runs-on: macos-latest\r
+    steps:\r
+      - uses: lukka/get-cmake@latest\r
+\r
+      - name: Get pushed code\r
+        uses: actions/checkout@v3\r
+      \r
+      - name: Checkout libebml\r
+        uses: actions/checkout@v3\r
+        with: \r
+          repository: Matroska-Org/libebml\r
+          path: libebml\r
+          # minimum version we support ref: 'release-1.4.3'\r
+\r
+      - name: Configure libebml\r
+        run: cmake -S libebml -B libebml/_build\r
+\r
+      - name: Build libebml\r
+        run: cmake --build libebml/_build --parallel\r
+\r
+      - name: Install libebml\r
+        run: cmake --install libebml/_build --prefix ${GITHUB_WORKSPACE}/_built\r
+\r
+      - name: Configure CMake \r
+        run: cmake -S . -B _build -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML"\r
+\r
+      - name: Build with CMake\r
+        run: cmake --build _build --parallel\r
+\r
+      - name: Test installation\r
+        run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built\r
diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml
new file mode 100644 (file)
index 0000000..1dfed33
--- /dev/null
@@ -0,0 +1,45 @@
+name: "Windows Build"\r
+on:\r
+  push:\r
+    branches: [ master ]\r
+  pull_request:\r
+    # branches: [ master ]\r
+\r
+jobs:\r
+  build_libmatroska:\r
+    name: ${{ matrix.config }} libmatroska for Windows\r
+    runs-on: windows-latest\r
+    strategy:\r
+      fail-fast: false\r
+      matrix:\r
+        config: [Debug, Release]\r
+    steps:\r
+      - uses: lukka/get-cmake@latest\r
+\r
+      - name: Get pushed code\r
+        uses: actions/checkout@v3\r
+      \r
+      - name: Checkout libebml\r
+        uses: actions/checkout@v3\r
+        with: \r
+          repository: Matroska-Org/libebml\r
+          path: libebml\r
+          # minimum version we support ref: 'release-1.4.3'\r
+\r
+      - name: Configure libebml\r
+        run: cmake -S libebml -B libebml/_build\r
+\r
+      - name: Build libebml\r
+        run: cmake --build libebml/_build --config ${{ matrix.config }} --parallel\r
+\r
+      - name: Install libebml\r
+        run: cmake --install libebml/_build --config ${{ matrix.config }} --prefix ${GITHUB_WORKSPACE}/_built\r
+\r
+      - name: Configure CMake \r
+        run: cmake -S . -B _build -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML"\r
+\r
+      - name: Build with CMake\r
+        run: cmake --build _build --config ${{ matrix.config }} --parallel\r
+\r
+      - name: Test installation\r
+        run: cmake --install _build --config ${{ matrix.config }} --prefix ${GITHUB_WORKSPACE}/_built\r
index 01ac89166e5fa8d7dbe038f191ad42f563830de1..e4f04e3c1bd77ecf684f405a65a4b3786c1b3440 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,3 +1,8 @@
+[![Linux](https://github.com/Matroska-Org/libmatroska/actions/workflows/linux.yaml/badge.svg)](https://github.com/Matroska-Org/libmatroska/actions/workflows/linux.yaml)
+[![Windows](https://github.com/Matroska-Org/libmatroska/actions/workflows/windows.yaml/badge.svg)](https://github.com/Matroska-Org/libmatroska/actions/workflows/windows.yaml)
+[![macOS](https://github.com/Matroska-Org/libmatroska/actions/workflows/macos.yaml/badge.svg)](https://github.com/Matroska-Org/libmatroska/actions/workflows/macos.yaml)
+[![GCC10](https://github.com/Matroska-Org/libmatroska/actions/workflows/linux-gcc10.yaml/badge.svg)](https://github.com/Matroska-Org/libmatroska/actions/workflows/linux-gcc10.yaml)
+
 # libmatroska
 a C++ library to parse and create Matroska files