name: Build tools on: push: branches: [ '*' ] pull_request: branches: [ master ] jobs: csv_to_ulog: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Build csv_to_ulog run: cd tools/csv_to_ulog && mkdir build && cd build && cmake .. && make - name: Test csv_to_ulog run: | cd tools/csv_to_ulog/build echo -e "t,x,y,z\n0,1,2,3\n1,4,5,6" > log.csv ./csv_to_ulog log.csv test $(stat -c %s log.ulg) -eq 196 pyflix: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install Python build tools run: pip install build - name: Build pyflix run: python3 -m build tools - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: pyflix path: | tools/dist/pyflix-*.tar.gz tools/dist/pyflix-*.whl python_tools: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install Python dependencies run: pip install -r tools/requirements.txt - name: Test csv_to_mcap tool run: | cd tools echo -e "t,x,y,z\n0,1,2,3\n1,4,5,6" > log.csv ./csv_to_mcap.py log.csv test $(stat -c %s log.mcap) -eq 883 sloc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: sudo apt-get install -y cloc jq - name: Print source lines of code run: cloc --by-file-by-lang flix - name: Checkout previous revision uses: actions/checkout@v4 with: ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} path: prev - name: Annotate total source lines run: | SLOC=$(cloc flix --json | jq -r '.SUM.code') PREV_SLOC=$(cloc prev/flix --json | jq -r '.SUM.code') DIFF=$(printf '%+d' "$((SLOC - PREV_SLOC))") echo "* Current SLOC: $SLOC" >> $GITHUB_STEP_SUMMARY echo "* Previous SLOC: $PREV_SLOC" >> $GITHUB_STEP_SUMMARY echo "* Diff: $DIFF" >> $GITHUB_STEP_SUMMARY