Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: CI

on:
push:
branches: [master]
tags: ['v*']
pull_request:
branches: [master]

jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install black flake8
- name: Run style check
run: make style

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install -e .
pip install mypy
- name: Run typecheck
run: make typecheck

codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install codespell
run: pip install codespell
- name: Run codespell
run: make codespell

unit-tests:
runs-on: ubuntu-latest
container:
image: registry.gitlab.com/linaro/tuxmake/ci-debian-12
steps:
- uses: actions/checkout@v4
- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Install dependencies
run: |
pip install -e . --break-system-packages
pip install -r requirements-dev.txt --break-system-packages
- name: Run unit tests
run: make unit-tests

unit-tests-arm64:
runs-on: ubuntu-24.04-arm
container:
image: registry.gitlab.com/linaro/tuxmake/ci-debian-12
steps:
- uses: actions/checkout@v4
- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Install dependencies
run: |
pip install -e . --break-system-packages
pip install -r requirements-dev.txt --break-system-packages
- name: Run unit tests
run: make unit-tests

integration-tests:
runs-on: ubuntu-latest
container:
image: registry.gitlab.com/linaro/tuxmake/ci-debian-12
steps:
- uses: actions/checkout@v4
- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Install tuxmake
run: pip install -e . --break-system-packages
- name: Run integration tests
run: make integration-tests TMV=1

build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install mkautodoc mkdocs-material flit pytest docutils
pip install -e .
- name: Build man page
run: make man
- name: Build docs
run: make doc
- uses: actions/upload-artifact@v4
with:
name: docs
path: public

pages:
runs-on: ubuntu-latest
needs: build-docs
if: startsWith(github.ref, 'refs/tags/v')
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/download-artifact@v4
with:
name: docs
path: public
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: public
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 0 additions & 1 deletion scripts/test_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from tuxmake.toolchain import Toolchain
from tuxmake.wrapper import Wrapper


root = Path(__file__).parent.parent


Expand Down
1 change: 0 additions & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from tuxmake.arch import Architecture


if pytest.__version__ < "3.9":

@pytest.fixture()
Expand Down
1 change: 0 additions & 1 deletion tuxmake/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from tuxmake.utils import quote_command_line
from tuxmake.utils import retry


DEFAULT_RUNTIME = "null"
DEFAULT_CONTAINER_REGISTRY = "docker.io"

Expand Down
1 change: 0 additions & 1 deletion tuxmake/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pathlib import Path
from typing import List


# Constants for file operations
KB = 1024
MB = KB * 1024
Expand Down