fix #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) The c-ares project and its contributors | |
# SPDX-License-Identifier: MIT | |
name: QNX | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.ref }}-qnx | |
cancel-in-progress: true | |
env: | |
CC: qcc | |
CXX: q++ | |
CFLAGS: "-V gcc_ntox86_64" | |
CXXFLAGS: "-V gcc_ntox86_64" | |
CPUVARDIR: "x86_64" | |
CMAKE_FIND_ROOT_PATH: "${QNX_TARGET};${QNX_TARGET}/${CPUVARDIR}" | |
CONFIG_OPTS: "--host=x86_64-unknown-nto-qnx8.0.0" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: "QNX" | |
steps: | |
- name: Install packages | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: cmake ninja-build autoconf automake libtool | |
version: 1.0 | |
# Logic for intalling SDP taken right out of https://github.com/qnx-ports/build-files/blob/main/.github/workflows/c-ares.yml | |
- name: Download SDP 8.0 | |
env: | |
LICENSE_KEY: ${{ secrets.LICENSE_KEY }} | |
MYQNX_USER: ${{ secrets.MYQNX_USER }} | |
MYQNX_PASSWORD: ${{ secrets.MYQNX_PASSWORD }} | |
run: | | |
echo "Downloading QNX Software Center ..." | |
mkdir ${{ github.workspace }}/.qnx | |
curl --cookie-jar ${{ github.workspace }}/.qnx/myqnxcookies.auth --form "userlogin=$MYQNX_USER" --form "password=$MYQNX_PASSWORD" -X POST https://www.qnx.com/account/login.html > login_response.html | |
curl -L --cookie ${{ github.workspace }}/.qnx/myqnxcookies.auth https://www.qnx.com/download/download/77351/qnx-setup-2.0.3-202408131717-linux.run > qnx-setup-lin.run | |
chmod a+x qnx-setup-lin.run | |
./qnx-setup-lin.run force-override disable-auto-start agree-to-license-terms ${{ github.workspace }}/qnxinstall | |
echo "Installing License ..." | |
${{ github.workspace }}/qnxinstall/qnxsoftwarecenter/qnxsoftwarecenter_clt -syncLicenseKeys -myqnx.user="$MYQNX_USER" -myqnx.password="$MYQNX_PASSWORD" -addLicenseKey $LICENSE_KEY | |
cp -r ~/.qnx/license ${{ github.workspace }}/.qnx | |
echo "Downloading QNX SDP ..." | |
${{ github.workspace }}/qnxinstall/qnxsoftwarecenter/qnxsoftwarecenter_clt -mirror -cleanInstall -destination ${{ github.workspace }}/qnx800 -installBaseline com.qnx.qnx800 -myqnx.user="$MYQNX_USER" -myqnx.password="$MYQNX_PASSWORD" | |
- name: Checkout googletest | |
uses: actions/checkout@v4 | |
with: | |
repository: qnx-ports/googletest | |
path: googletest | |
- name: Set CMAKE_FIND_ROOT_PATH | |
run: | | |
source "${{ github.workspace }}/qnx800/qnxsdp-env.sh" | |
echo "CMAKE_FIND_ROOT_PATH=${QNX_TARGET};${QNX_TARGET}/${CPUVARDIR}" >> $GITHUB_ENV | |
- name: Build googletest | |
run: | | |
source "${{ github.workspace }}/qnx800/qnxsdp-env.sh" | |
cd googletest | |
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_STAGING_PREFIX=${QNX_TARGET}/x86_64/usr -DCMAKE_INSTALL_INCLUDEDIR=${QNX_TARGET}/usr/include -DCMAKE_FIND_ROOT_PATH="${CMAKE_FIND_ROOT_PATH}" -DBUILD_GMOCK=ON -DINSTALL_GTEST=ON -Dgtest_disable_pthreads=ON -DCMAKE_VERBOSE_MAKEFILE=ON . | |
gmake | |
gmake install | |
- name: Checkout c-ares | |
uses: actions/checkout@v4 | |
with: | |
path: c-ares | |
- name: "CMake: build c-ares" | |
env: | |
BUILD_TYPE: CMAKE | |
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=DEBUG -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON -DCARES_BUILD_TESTS=ON -G Ninja -DCMAKE_SYSTEM_NAME=QNX -DCMAKE_FIND_ROOT_PATH=${{ env.CMAKE_FIND_ROOT_PATH }} -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY" | |
run: | | |
source "${{ github.workspace }}/qnx800/qnxsdp-env.sh" | |
cd c-ares | |
./ci/build.sh | |
- name: "Autotools: build c-ares" | |
env: | |
CC: qcc | |
CXX: q++ | |
BUILD_TYPE: autotools | |
run: | | |
source "${{ github.workspace }}/qnx800/qnxsdp-env.sh" | |
cd c-ares | |
./ci/build.sh | |