name: CI on: push: branches: - main pull_request: workflow_dispatch: schedule: - cron: "0 2,8,14,20 * * *" jobs: lint: name: Lint and format check runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 with: python-version: '3.x' - name: Install ruff run: pip install ruff - name: Run ruff linter run: ruff check . - name: Run ruff format check run: ruff format --check . gnu: name: Process the GNU and size test results runs-on: ubuntu-latest steps: - name: Install deps shell: bash run: | sudo apt-get update sudo apt-get install jq python3-pandas python3-matplotlib python3-seaborn fonts-dejavu-core - name: Checkout repo uses: actions/checkout@v6 - name: Checkout uutils/coreutils for unsafe counting uses: actions/checkout@v6 with: repository: uutils/coreutils path: uutils-coreutils fetch-depth: 1 - name: Download the GNU result uses: dawidd6/action-download-artifact@v21 with: workflow: GnuTests.yml name: test-summary repo: uutils/coreutils path: dl - name: Download the busybox result uses: dawidd6/action-download-artifact@v21 with: workflow: make.yml name: busybox-result.json repo: uutils/coreutils path: dl - name: Download the toybox result uses: dawidd6/action-download-artifact@v21 with: workflow: make.yml name: toybox-result.json repo: uutils/coreutils path: dl - name: Download the individual size result uses: dawidd6/action-download-artifact@v21 with: workflow: make.yml name: individual-size-result repo: uutils/coreutils path: dl - name: Download the size result uses: dawidd6/action-download-artifact@v21 with: workflow: make.yml name: size-result repo: uutils/coreutils path: dl - name: Download the full test report uses: dawidd6/action-download-artifact@v21 with: workflow: GnuTests.yml name: aggregated-result repo: uutils/coreutils path: dl - name: Merge the json files shell: bash run: | echo "== dl/gnu-result.json ==" cat dl/gnu-result.json echo "== gnu-result.json ==" cat gnu-result.json|tail -100 jq -s '.[0] * .[1]' gnu-result.json dl/gnu-result.json > merged.json echo "== merged.json =" cat merged.json|tail -100 mv merged.json gnu-result.json echo "== dl/busybox-result.json ==" cat dl/busybox-result.json|tail -100 echo "== busybox-result.json ==" cat busybox-result.json|tail -100 jq -s '.[0] * .[1]' busybox-result.json dl/busybox-result.json > merged.json echo "== merged.json =" cat merged.json mv merged.json busybox-result.json echo "== dl/toybox-result.json ==" cat dl/toybox-result.json|tail -100 echo "== toybox-result.json ==" cat toybox-result.json|tail -100 jq -s '.[0] * .[1]' toybox-result.json dl/toybox-result.json > merged.json echo "== merged.json =" cat merged.json|tail -100 mv merged.json toybox-result.json echo "== dl/individual-size-result.json ==" cat dl/individual-size-result.json echo "== individual-size-result.json ==" cat individual-size-result.json|tail -100 jq -s '.[0] * .[1]' individual-size-result.json dl/individual-size-result.json > merged.json echo "== merged.json =" cat merged.json|tail -100 mv merged.json individual-size-result.json echo "== dl/size-result.json ==" cat dl/size-result.json|tail -100 echo "== size-result.json ==" cat size-result.json|tail -100 jq -s '.[0] * .[1]' size-result.json dl/size-result.json > merged.json echo "== merged.json =" cat merged.json|tail -100 mv merged.json size-result.json echo "== dl/aggregated-result.json ==" cat dl/aggregated-result.json|tail -100 mv dl/aggregated-result.json aggregated-result.json rm -rf dl - name: Update unsafe count for the latest commit shell: bash run: | python3 unsafe_count.py uutils-coreutils > unsafe-latest.json cat unsafe-latest.json jq -s '.[0] * .[1]' unsafe-result.json unsafe-latest.json > merged.json mv merged.json unsafe-result.json rm -f unsafe-latest.json - name: Add & Commit if: github.event_name != 'pull_request' uses: EndBug/add-and-commit@v10.0.0 with: default_author: github_actions message: "Update of the data" pull: '--rebase --autostash' - name: Generate the graphs shell: bash run: | python graph.py gnu-result.json GNU python graph.py busybox-result.json BusyBox python graph.py toybox-result.json Toybox python individual-size-graph.py individual-size-result.json python size-graph.py size-result.json python unsafe-graph.py unsafe-result.json - name: Add & Commit the GNU graph if: github.event_name != 'pull_request' uses: EndBug/add-and-commit@v10.0.0 with: default_author: github_actions message: "Refresh the GNU graph" add: gnu-results.svg pull: '--rebase --autostash' - name: Add & Commit the busybox graph if: github.event_name != 'pull_request' uses: EndBug/add-and-commit@v10.0.0 with: default_author: github_actions message: "Refresh the busybox graph" add: busybox-results.svg pull: '--rebase --autostash' - name: Add & Commit the toybox graph if: github.event_name != 'pull_request' uses: EndBug/add-and-commit@v10.0.0 with: default_author: github_actions message: "Refresh the toybox graph" add: toybox-results.svg pull: '--rebase --autostash' - name: Add & Commit the individual size graph if: github.event_name != 'pull_request' uses: EndBug/add-and-commit@v10.0.0 with: default_author: github_actions message: "Refresh the individual size graph" add: individual-size-results pull: '--rebase --autostash' - name: Add & Commit the size graph if: github.event_name != 'pull_request' uses: EndBug/add-and-commit@v10.0.0 with: default_author: github_actions message: "Refresh the size graph" add: size-results.svg pull: '--rebase --autostash' - name: Add & Commit the unsafe graph if: github.event_name != 'pull_request' uses: EndBug/add-and-commit@v10.0.0 with: default_author: github_actions message: "Refresh the unsafe graph" add: unsafe-results.svg pull: '--rebase --autostash'