From 0a457a10809281edecf861979cc33e6cc9cb8d07 Mon Sep 17 00:00:00 2001 From: Xavierlm11 <79161102+Xavierlm11@users.noreply.github.com> Date: Sun, 15 May 2022 21:59:37 +0200 Subject: [PATCH 1/5] Create c-cpp.yml --- .github/workflows/c-cpp.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 00000000..186c6a81 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,23 @@ +name: C/C++ CI + +on: + push: + branches: [ Master ] + pull_request: + branches: [ Master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup MSBuild.exe + uses: warrenbuckley/Setup-MSBuild@v1 + + - name: Builds + working-directory: src + run: msbuild MyProject.csproj + From fbbfa2630c8fa8726c0ab7e5e85cae1f4ad27c71 Mon Sep 17 00:00:00 2001 From: Xavierlm11 <79161102+Xavierlm11@users.noreply.github.com> Date: Sun, 15 May 2022 22:00:44 +0200 Subject: [PATCH 2/5] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 186c6a81..64353ae2 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v3 From f6e042ea97423532f5a1409fa876460111f1f5eb Mon Sep 17 00:00:00 2001 From: Xavierlm11 <79161102+Xavierlm11@users.noreply.github.com> Date: Sun, 15 May 2022 22:30:01 +0200 Subject: [PATCH 3/5] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 64353ae2..19ac0eb4 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -13,11 +13,14 @@ jobs: steps: - uses: actions/checkout@v3 - - - name: Setup MSBuild.exe - uses: warrenbuckley/Setup-MSBuild@v1 - - - name: Builds - working-directory: src - run: msbuild MyProject.csproj + - name: Build c++ project + uses: nicledomaS/cmake_build_action@v1.4 + with: + submodule_update: ON + run_tests: ON + unit_test_build: -Dtest=ON + - uses: actions/upload-artifact@v2 + with: + path: build/*.tar.gz + name: artifact_${{ matrix.os }}_${{ matrix.configs }}.tar.gz From 61cae6b2168d143f16d28f8478a7c4165423190b Mon Sep 17 00:00:00 2001 From: Xavierlm11 <79161102+Xavierlm11@users.noreply.github.com> Date: Sun, 15 May 2022 22:32:07 +0200 Subject: [PATCH 4/5] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 19ac0eb4..ec06fcc3 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -18,7 +18,7 @@ jobs: with: submodule_update: ON run_tests: ON - unit_test_build: -Dtest=ON + # unit_test_build: -Dtest=ON - uses: actions/upload-artifact@v2 with: path: build/*.tar.gz From aa24a1887d1842b5e89ad15d5719ab0f8cdb6e87 Mon Sep 17 00:00:00 2001 From: Xavierlm11 <79161102+Xavierlm11@users.noreply.github.com> Date: Sun, 15 May 2022 22:36:53 +0200 Subject: [PATCH 5/5] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index ec06fcc3..a8098784 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -13,14 +13,29 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Build c++ project - uses: nicledomaS/cmake_build_action@v1.4 - with: - submodule_update: ON - run_tests: ON - # unit_test_build: -Dtest=ON - - uses: actions/upload-artifact@v2 - with: - path: build/*.tar.gz - name: artifact_${{ matrix.os }}_${{ matrix.configs }}.tar.gz - + - uses: actions/checkout@v2 + + - name: Create Build Directory + run: cmake -E make_directory ${{github.workspace}}/build + + - name: Install Packages + run: | + sudo apt-get update -qq + sudo apt-get install -y gcc-multilib python3 curl zip unzip + sudo apt-get install -y --no-install-recommends libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libgl1-mesa-dev + + - name: Configure Emscripten + shell: bash + + # Change the directory to be emsdk instead of the project root + working-directory: ${{github.workspace}}/emsdk + run: | + ./emsdk install latest + ./emsdk activate latest + + - name: Configure CMake + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -Wno-dev -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake + + - name: Build + + run: cmake --build ./build --config Release