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

Fixing CI/CD #245

Open
mofosyne opened this issue Oct 27, 2023 · 3 comments
Open

Fixing CI/CD #245

mofosyne opened this issue Oct 27, 2023 · 3 comments

Comments

@mofosyne
Copy link
Contributor

Did an investigation in #243 and traced the issue to AppVeyor dropping support for QT v6.1

As shown in https://www.appveyor.com/docs/windows-images-software/

I made a smaller PR to just change the version to latest QT so it can be merged now

#244

This will hopefully unblock the testing of other PR like mine #241

@thiagomacieira
Copy link
Member

I also need to rewrite the non-Windows one to use GitHub Actions, but as usual.... lack of time.

@mofosyne
Copy link
Contributor Author

mofosyne commented Oct 28, 2023

Ah that's fair enough. Not sure about how travis CI works, but i got an AI to take a stab at translating it to github actions.

https://github.com/intel/tinycbor/8b3e97d60eae572d56bac24a1c33444e0436c7a4/.travis.yml

After quite a few rounds of prompting using above as reference... it gave below which looks correct
No assurance of correctness, but should make things easier.

Here's the generated .github/workflows/main.yml

name: CI
on:
  push:
    branches: [main]
  pull_request:

jobs:

  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        include:
        
          - qt-version: 5.12.1
            os: linux
            dist: xenial 
            cc: gcc
            cxx: g++
            env:
              CFLAGS: "-Os -march=native"
              LDFLAGS: "-Wl,--no-undefined -lm"

          - qt-version: 5.12.1 
            os: linux
            dist: xenial
            cc: clang
            cxx: clang++
            env:
              CFLAGS: "-Oz"
              LDFLAGS: "-Wl,--no-undefined -lm"
              MAKEFLAGS: -s

          # Add other builds from matrix
            
    steps:
    
    - uses: actions/checkout@v2

    - name: Install Qt
      uses: jurplel/install-qt-action@v2
      with:
        version: ${{ matrix.qt-version }}
       
    - name: Install apt packages  
      run: |
        sudo apt-get update
        sudo apt-get install -y qt512base valgrind doxygen

    - name: Configure
      run: |
        eval "${{ matrix.cc }} && ${{ matrix.cxx }}"
        make -f Makefile.configure configure

    - name: Build
      env:
        CFLAGS: "${{ matrix.env.CFLAGS }}"
      run: |
        make lib/libtinycbor.a

    - name: Check size
      run: |
        size lib/libtinycbor.a

    - name: Clean
      run: |
        make -s clean

    - name: Build debug
      env:
        CFLAGS: "-O0 -g"
      run: |
        make lib/libtinycbor.a

    - name: Tests
      env:
        LDFLAGS: "${{ matrix.env.LDFLAGS }}"
        LDLIBS: "${{ matrix.env.LDLIBS }}"  
      run: |
        grep -q freestanding-pass .config || make tests/Makefile
        grep -q freestanding-pass .config || (cd tests && make check)

    - name: Clean
      run: |
        make -s clean
        
  docs:

    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main'

    steps:
    
    - uses: actions/checkout@v2

    - name: Build docs
      run: ./scripts/update-docs.sh

@thiagomacieira
Copy link
Member

@pjonsson is working on this on #247. Would you be able to lend a hand?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants