POSIX directory functions (opendir, closedir and readdir) #3678
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright 2022 Davide Bettio <[email protected]> | |
# | |
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later | |
# | |
name: "Check formatting" | |
on: | |
push: | |
paths: | |
- '.github/workflows/**' | |
- 'CMakeLists.txt' | |
- 'src/**' | |
- 'tests/**' | |
- '**/*.erl' | |
pull_request: | |
paths: | |
- '.github/workflows/**' | |
- 'CMakeLists.txt' | |
- 'src/**' | |
- 'tests/**' | |
- '**/*.erl' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/main' && github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
clang-format-prettier-check: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Install run-clang-format" | |
run: | | |
wget -q -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" | sudo tee -a /etc/apt/sources.list | |
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" | sudo tee -a /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install -y clang-format-16 | |
curl -sSfL https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py -o run-clang-format | |
chmod +x run-clang-format | |
- name: "Check formatting with clang-format" | |
run: | | |
./run-clang-format --style=file --clang-format-executable=clang-format-16 -r src/ tests/ | |
- name: "Check formatting with prettier" | |
if: success() || failure() | |
run: | | |
npm install prettier | |
find ../src/platforms/emscripten/ ../examples/emscripten/ -name "*.js" -o -name "*.html" | xargs npx prettier -c | |
erlfmt-check: | |
runs-on: ubuntu-24.04 | |
container: erlang:27 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Check formatting with Erlang fmt" | |
run: | | |
cd .. | |
git clone --depth 1 -b v1.1.0 https://github.com/WhatsApp/erlfmt.git | |
cd erlfmt | |
rebar3 as release escriptize | |
cd ../AtomVM | |
find . -name *.erl | xargs ../erlfmt/_build/release/bin/erlfmt -c | |
mix-format-check: | |
runs-on: ubuntu-24.04 | |
container: elixir:1.17.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Check formatting with Elixir mix format" | |
run: | | |
cd libs/exavmlib/ | |
mix format --check-formatted |