diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 175ba140..00000000 --- a/.cirrus.yml +++ /dev/null @@ -1,27 +0,0 @@ -task: - - # only test the main branch and pull requests - only_if: $CIRRUS_BRANCH == "main" || $CIRRUS_PR != "" - - matrix: - - name: macOS - macos_instance: - image: ghcr.io/cirruslabs/macos-runner:sequoia - environment: - CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=undefined - PATH: /opt/homebrew/opt/llvm/bin:${PATH} - UBSAN_OPTIONS: print_stacktrace=1 - install_script: brew update && brew install coreutils cscope llvm && env PIP_BREAK_SYSTEM_PACKAGES=1 python3 -m pip install pytest - test_script: ./misc/ci.sh - - - name: C formatting - container: - image: silkeh/clang:19 - install_script: apt-get update -y && apt-get install --no-install-recommends -y git - test_script: clang-format --version && git ls-files -z -- ':!:test/cases' '**/*.c' '**/*.h' | xargs -0 -- clang-format --dry-run --style=file --Werror - - - name: Python formatting - container: - image: cytopia/black - install_script: apk add git - test_script: git ls-files -z -- ':!:test/cases' '**/*.py' | xargs -0 -- python3 -m black && git diff --exit-code diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 670d5358..ef7193af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,25 @@ jobs: ./build/test/find-me/find-me cmake --install build + macos26: + name: macOS + runs-on: macos-26-intel + env: + CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined + UBSAN_OPTIONS: print_stacktrace=1 + steps: + - run: python3 --version + - run: brew update + - run: brew install coreutils cscope + - run: env PIP_BREAK_SYSTEM_PACKAGES=1 python3 -m pip install pytest + - run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" + - run: git clone --no-checkout --recurse-submodules -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd + - run: > + cd wd && + git fetch -- origin ${{ github.event.pull_request.head.sha }} && + git checkout FETCH_HEAD && + env PATH=$(brew --prefix llvm@20)/bin:${PATH} ./misc/ci.sh + ubuntu2604: name: Linux runs-on: ubuntu-26.04 @@ -74,3 +93,39 @@ jobs: git fetch -- origin ${{ github.event.pull_request.head.sha }} && git checkout FETCH_HEAD && ./misc/ci.sh + + c_analysis: + name: C analysis + runs-on: ubuntu-26.04 + steps: + - run: uname -rms + - run: python3 --version + - run: clang --version + - run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" + - run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd + - run: > + cd wd && + git fetch -- origin ${{ github.event.pull_request.head.sha }} && + git checkout FETCH_HEAD + - run: > + cd wd && git ls-files -z -- ':!:test/cases' '**/*.c' '**/*.h' | + xargs -0 -- clang-format-22 --dry-run --style=file --Werror -- + + python_analysis: + name: Python analysis + runs-on: ubuntu-26.04 + steps: + - run: uname -rms + - run: python3 --version + - run: python3 -m pip install --user black + - run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" + - run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd + - run: > + cd wd && + git fetch -- origin ${{ github.event.pull_request.head.sha }} && + git checkout FETCH_HEAD + - run: > + cd wd && + git ls-files -z -- ':!:test/cases' '**/*.py' | + xargs -0 -- python3 -m black -- && + git diff --exit-code