From bebff78ff4f7c3ec462ac741ebc75cf94c8e67bc Mon Sep 17 00:00:00 2001 From: Can <can.lehmann@emmtrix.com> Date: Tue, 26 Nov 2024 17:40:13 +0100 Subject: [PATCH 1/8] Add build workflow --- .github/workflows/build.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..0c0b98a --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,9 @@ +name: Build +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: ls From 5e3fba1b62c6c456ebf3f0dd6a238b255ca0f8c9 Mon Sep 17 00:00:00 2001 From: Can <can.lehmann@emmtrix.com> Date: Tue, 26 Nov 2024 17:45:29 +0100 Subject: [PATCH 2/8] Build and run tests --- .github/workflows/build.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0c0b98a..5f9c041 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,4 +6,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: ls + - name: Create build directory + run: | + mkdir build + cd build + - name: Run CMake + run: cmake -DCMAKE_BUILD_TYPE=Release .. + - name: Build onnx2c and tests + run: make + - name: Run tests + run: make test From ba0a9f78b15d5c8644ad189adecd62ad402fe365 Mon Sep 17 00:00:00 2001 From: Can <can.lehmann@emmtrix.com> Date: Tue, 26 Nov 2024 17:48:16 +0100 Subject: [PATCH 3/8] Switch to build directory --- .github/workflows/build.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5f9c041..35ad8e1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,12 +7,13 @@ jobs: steps: - uses: actions/checkout@v4 - name: Create build directory - run: | - mkdir build - cd build + run: mkdir build - name: Run CMake run: cmake -DCMAKE_BUILD_TYPE=Release .. + working-directory: build - name: Build onnx2c and tests run: make + working-directory: build - name: Run tests run: make test + working-directory: build From c7a282c8678a18ce9074fca40fcc283fb2d918ba Mon Sep 17 00:00:00 2001 From: Can <can.lehmann@emmtrix.com> Date: Tue, 26 Nov 2024 17:50:19 +0100 Subject: [PATCH 4/8] Install dependencies --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 35ad8e1..88dda56 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,6 +6,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install dependencies + run: apt install libprotobuf-dev protobuf-compiler - name: Create build directory run: mkdir build - name: Run CMake From d01641ab14334db8f930f1b285ad23e7e520d54b Mon Sep 17 00:00:00 2001 From: Can <can.lehmann@emmtrix.com> Date: Tue, 26 Nov 2024 17:51:13 +0100 Subject: [PATCH 5/8] Fix install dependencies --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 88dda56..a7af879 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install dependencies - run: apt install libprotobuf-dev protobuf-compiler + run: sudo apt-get install libprotobuf-dev protobuf-compiler - name: Create build directory run: mkdir build - name: Run CMake From 672acc19a389d141f5dd21c0c13f30ebe8840c60 Mon Sep 17 00:00:00 2001 From: Can <can.lehmann@emmtrix.com> Date: Tue, 26 Nov 2024 17:58:08 +0100 Subject: [PATCH 6/8] Checkout submodules --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a7af879..244648a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,6 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + submodules: true - name: Install dependencies run: sudo apt-get install libprotobuf-dev protobuf-compiler - name: Create build directory From 24ed6db6c945b2b322dae51b6d3828eb5d4ee888 Mon Sep 17 00:00:00 2001 From: Can <can.lehmann@emmtrix.com> Date: Tue, 26 Nov 2024 17:59:13 +0100 Subject: [PATCH 7/8] Fix syntax --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 244648a..db89174 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - submodules: true + with: + submodules: true - name: Install dependencies run: sudo apt-get install libprotobuf-dev protobuf-compiler - name: Create build directory From d5bb245e54f2847ec6fb31391311134c7cc7db47 Mon Sep 17 00:00:00 2001 From: Can <can.lehmann@emmtrix.com> Date: Tue, 26 Nov 2024 18:03:20 +0100 Subject: [PATCH 8/8] Build both debug and release --- .github/workflows/build.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index db89174..5fd1564 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,6 +4,9 @@ on: [push, pull_request] jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + build_type: [Debug, Release] steps: - uses: actions/checkout@v4 with: @@ -13,7 +16,7 @@ jobs: - name: Create build directory run: mkdir build - name: Run CMake - run: cmake -DCMAKE_BUILD_TYPE=Release .. + run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. working-directory: build - name: Build onnx2c and tests run: make