Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Actions] Adding 32-bit Linux builds #313

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .github/workflows/Linux build template.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build ThunderNanoServicesRDK on Linux
name: Linux build template

on:
workflow_call:
Expand All @@ -11,8 +11,9 @@ jobs:
strategy:
matrix:
build_type: [Debug, Release, MinSizeRel]
architecture: [32, 64]

name: Build type - ${{matrix.build_type}}
name: Build type - ${{matrix.build_type}}${{matrix.architecture == '32' && ' x86' || ''}}
steps:
# --------- Packages install & artifacts download ---------
- name: Install necessary packages
Expand All @@ -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: ThunderInterfaces-${{matrix.build_type}}-artifact
name: ThunderInterfaces-${{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

# ----- Checkout & Options regex -----
- name: Checkout ThunderNanoServicesRDK
Expand All @@ -59,7 +62,8 @@ jobs:
- name: Build ThunderNanoServicesRDK
run: |
cmake -G Ninja -S ThunderNanoServicesRDK -B ${{matrix.build_type}}/build/ThunderNanoServicesRDK \
-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" \
-DPLUGIN_DEVICEIDENTIFICATION=ON \
Expand All @@ -74,10 +78,10 @@ jobs:
cmake --build ${{matrix.build_type}}/build/ThunderNanoServicesRDK --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: ThunderNanoServicesRDK-${{matrix.build_type}}-artifact
path: ${{matrix.build_type}}.tar.gz
name: ThunderNanoServicesRDK-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact
path: ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz