GitHub Actions : GCC11, pCap, wxWidgets, Boost

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Virchanza
I live to help wx-kind
I live to help wx-kind
Posts: 172
Joined: Sun Jul 19, 2009 6:12 am

GitHub Actions : GCC11, pCap, wxWidgets, Boost

Post by Virchanza »

I now have 'Github Actions' for the repository for my 'Dynamo' program set up to do the following:
- Install gcc/g++ version 11 (for C++20)
- Install pCap dev headers and library
- Install wxGTK
- Install Boost

Here's what I've got for the '.yml' file:

Code: Select all

name: C/C++ CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Install GCC11, pCap, wxWidgets
      run: sudo apt update && sudo apt install -y gcc-11 g++-11 libpcap-dev libwxgtk3.0-gtk3-dev && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
    - name: Install Boost
      run: sudo apt install -y libboost-all-dev
    - name: Display versions of tools and libraries
      continue-on-error: true
      run: uname -a; cat /usr/include/boost/version.hpp | grep "define BOOST_LIB_VERSION"; wx-config --list; wx-config --cxxflags; wx-config --libs; g++ --version | grep g++
    - name: make
      run: make
    - name: Check binary file
      run: ls -alh dynamo; file dynamo
I could have separated some of the commands onto multiple lines, but I did this on my smartphone and couldn't get the tab character properly.

I install Boost separate from the other libraries because I tried to add the latest Ubuntu repository in order to download Boost 1.74, but I couldn't get it to work. This downloads 1.71. Alternatively I could download the source for 1.74 and compile it but that would take ~45mins. I suppose I could also create my own '.deb' file for 1.74 but that's another day's work.

It works.
ollydbg23
Super wx Problem Solver
Super wx Problem Solver
Posts: 438
Joined: Fri Dec 12, 2008 10:31 am

Re: GitHub Actions : GCC11, pCap, wxWidgets, Boost

Post by ollydbg23 »

Good work!
Post Reply