Upgrade builder bison & gcc

My project is using feature introduced in Bison 3.6 (%define parse.error custom). However, ubuntu-latest environment has the 3.0 as newest and ubuntu-20.04 has 3.5.

Also, with the introduction of C++20, it would be nice to use GCC 10.

Hi @trexxet,

Glad to see you in Github Community Forum!

You can update the version to bison3.6 and install GCC10 on the hosted runner, code sample as below:

      - name: update bison
        run: |
          wget http://ftp.gnu.org/gnu/bison/bison-3.6.tar.gz
          tar -zxvf bison-3.6.tar.gz
          cd bison-3.6
          ./configure
          make
          sudo make install         
      - name: update GCC
        run: |
          sudo apt-get install build-essential software-properties-common 
          sudo add-apt-repository ppa:ubuntu-toolchain-r/test
          sudo apt-get install gcc-10 g++-10
          sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
          sudo update-alternatives --config gcc
      - name: check version
        run: |
          bison -V
          gcc --version

Please check my workflow for your reference.

The hosted runner image is updated weekly, if you’d like the updated version to be default, you can raise a feedback ticket in below link, github product manager will take a review and confirm.
https://support.github.com/contact/feedback?contact[category]=actions

Thanks

Hi @trexxet,

Just want to know if the issue is resolved with my answer? Let me know if you have any other questions.

If it’s resolved, you can mark the answer to archive the ticket.

Thanks.

Hi @weide-zhou,
yep, that works. Thanks!