Skip to content

Bump copyright year #12

Bump copyright year

Bump copyright year #12

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
detect-code-related-file-changes:
runs-on: ubuntu-24.04
outputs:
has_code_related_changes: ${{ steps.set_has_code_related_changes.outputs.has_code_related_changes }}
steps:
- name: Check out the repo
uses: actions/checkout@v6
- name: Test changed files
id: changed-files
uses: tj-actions/changed-files@v47
with:
files: |
.ci/**
.github/**
configs/**
include/**
mk/**
ports/**
scripts/**
src/**
tests/**
.clang-format
Makefile
- name: Set has_code_related_changes
id: set_has_code_related_changes
run: |
if [[ ${{ steps.changed-files.outputs.any_changed }} == true ]]; then
echo "has_code_related_changes=true" >> $GITHUB_OUTPUT
else
echo "has_code_related_changes=false" >> $GITHUB_OUTPUT
fi
coding-style:
needs: [detect-code-related-file-changes]
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
timeout-minutes: 10
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install formatting tools
run: .ci/install-deps.sh format
- name: Check newline at end of files
run: .ci/check-newline.sh
- name: Check code formatting
run: .ci/check-format.sh
unit-tests:
needs: [detect-code-related-file-changes]
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-latest]
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: .ci/install-deps.sh sdl2
- name: Build and test
run: |
source .ci/common.sh
make defconfig
make $PARALLEL
make check
headless-tests:
needs: [detect-code-related-file-changes, unit-tests]
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
timeout-minutes: 30
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: .ci/install-deps.sh headless
- name: Run headless tests
run: |
source .ci/common.sh
make defconfig
make check-headless $PARALLEL
- name: Save screenshots on failure
if: failure()
run: python3 scripts/headless-test.py --lib .build/test/libiui.a -s
continue-on-error: true
- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v6
with:
name: test-screenshots
path: build/*.png
retention-days: 7
sanitizers:
needs: [detect-code-related-file-changes, unit-tests]
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
timeout-minutes: 30
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: .ci/install-deps.sh sdl2
- name: Build and test with ASan
run: |
make defconfig
echo "CONFIG_SANITIZERS=y" >> .config
make check
build-matrix:
needs: [detect-code-related-file-changes]
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
timeout-minutes: 30
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- config: "minimal"
modules: ""
- config: "basic"
modules: "CONFIG_MODULE_BASIC=y"
- config: "full"
modules: "CONFIG_MODULE_BASIC=y CONFIG_MODULE_INPUT=y CONFIG_MODULE_CONTAINER=y"
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: .ci/install-deps.sh sdl2
- name: Build ${{ matrix.config }}
run: |
source .ci/common.sh
make defconfig
for mod in ${{ matrix.modules }}; do echo "$mod" >> .config; done
make libiui.a $PARALLEL
size libiui.a || true
ls -lh libiui.a
wasm-build:
needs: [detect-code-related-file-changes]
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
timeout-minutes: 30
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Cache Emscripten
uses: actions/cache@v5
with:
path: emsdk-cache
key: emsdk-4.0.3-${{ runner.os }}
- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: 4.0.3
actions-cache-folder: emsdk-cache
- name: Build WebAssembly
run: .ci/build-wasm.sh build
- name: Prepare deployment
run: .ci/build-wasm.sh deploy-prep
- name: Upload WASM artifacts
uses: actions/upload-artifact@v6
with:
name: wasm-build
path: deploy/
retention-days: 7
deploy-pages:
needs: [wasm-build]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
timeout-minutes: 10
runs-on: ubuntu-24.04
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/download-artifact@v6
with:
name: wasm-build
path: deploy/
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: deploy/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4