From 0237b037cce2aedb69cc898cfcfab627cde4d15e Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Thu, 1 Aug 2024 10:36:55 +0200 Subject: [PATCH 1/3] Adding a 32 bit build to the Linux workflow --- .github/workflows/Linux build template.yml | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 1d11622..86f034c 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: build_type: [Debug, Release, MinSizeRel] + architecture: [32, 64] # ----- Packages & artifacts ----- name: Build type - ${{matrix.build_type}} @@ -23,21 +24,23 @@ jobs: command: | sudo gem install apt-spy2 sudo apt-spy2 fix --commit --launchpad --country=US + echo "deb http://archive.ubuntu.com/ubuntu/ jammy main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list + echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list + sudo dpkg --add-architecture i386 sudo apt-get update - sudo apt install python3-pip - pip install jsonref - sudo apt install build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev + sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev zlib1g-dev:i386 libssl-dev gcc-11-multilib g++-11-multilib + sudo pip install jsonref - name: Download artifacts uses: actions/download-artifact@v4 with: - name: Thunder-${{matrix.build_type}}-artifact + name: Thunder-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact path: ${{matrix.build_type}} - name: Unpack files run: | - tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz - rm ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz + tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz + rm ${{matrix.build_type}}/${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz # ----- Regex & checkout ----- - name: Checkout ThunderLibraries @@ -59,7 +62,8 @@ jobs: - name: Build ThunderLibraries run: | cmake -G Ninja -S ThunderLibraries -B ${{matrix.build_type}}/build/ThunderLibraries \ - -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror" \ + -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ + -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ -DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \ -DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" \ -DBROADCAST=ON \ @@ -67,10 +71,10 @@ jobs: cmake --build ${{matrix.build_type}}/build/ThunderLibraries --target install - name: Tar files - run: tar -czvf ${{matrix.build_type}}.tar.gz ${{matrix.build_type}} + run: tar -czvf ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz ${{matrix.build_type}} - name: Upload uses: actions/upload-artifact@v4 with: - name: ThunderLibraries-${{matrix.build_type}}-artifact - path: ${{matrix.build_type}}.tar.gz + name: ThunderLibraries-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact + path: ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz From 0008afa88e1917d7890c2fe980d68fbe7f497e82 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Thu, 1 Aug 2024 10:37:59 +0200 Subject: [PATCH 2/3] Adding new build type naming --- .github/workflows/Linux build template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 86f034c..73c9b55 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -14,7 +14,7 @@ jobs: architecture: [32, 64] # ----- Packages & artifacts ----- - name: Build type - ${{matrix.build_type}} + name: Build type - ${{matrix.build_type}}${{matrix.architecture == '32' && ' x86' || ''}} steps: - name: Install necessary packages uses: nick-fields/retry@v3 From 9c1abb8df57145fab1432dc75bf1ca30ba24ea11 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:01:24 +0200 Subject: [PATCH 3/3] Giving a unique name to the template --- .github/workflows/Linux build template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 73c9b55..3f3df39 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -1,4 +1,4 @@ -name: Build ThunderLibraries on Linux +name: Linux build template on: workflow_call: