diff --git a/.github/.prettierrc b/.github/.prettierrc new file mode 100644 index 0000000000..544138be45 --- /dev/null +++ b/.github/.prettierrc @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml index 7f3c1994b3..47a71006cf 100644 --- a/.github/ISSUE_TEMPLATE/documentation.yml +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -1,7 +1,7 @@ name: 📕 Documentation Issue description: Report an issue in the Reference documentation or Developer Guide title: (short issue description) -labels: "Unit: Documentation" +labels: ['Unit: Documentation'] body: - type: textarea id: description diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 123014908b..6778b0493a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,6 @@ version: 2 updates: - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: 'github-actions' + directory: '/' schedule: - interval: "daily" + interval: 'daily' diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index effbcd3dd2..b88318adf5 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -3,7 +3,6 @@ name: Debug CI on: [workflow_dispatch] jobs: - debug-msvc: runs-on: windows-2019 timeout-minutes: 121 diff --git a/.github/workflows/docs_ci.yml b/.github/workflows/docs_ci.yml index aaec9acb2e..73215768ac 100644 --- a/.github/workflows/docs_ci.yml +++ b/.github/workflows/docs_ci.yml @@ -7,12 +7,12 @@ name: Docs CI on: push: paths-ignore: - - "**.yml" - - "!**/docs_ci.yml" + - '**.yml' + - '!**/docs_ci.yml' pull_request: paths-ignore: - - "**.yml" - - "!**/docs_ci.yml" + - '**.yml' + - '!**/docs_ci.yml' concurrency: group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} @@ -45,7 +45,7 @@ jobs: uses: actions/checkout@v4 with: repository: vlang/v - ref: master # important + ref: master # important path: pv - name: Check against parent commit diff --git a/.github/workflows/paths_ci.yml b/.github/workflows/paths_ci.yml index fc141719f3..b3ca3634d2 100644 --- a/.github/workflows/paths_ci.yml +++ b/.github/workflows/paths_ci.yml @@ -3,11 +3,11 @@ name: Path Testing CI on: push: paths-ignore: - - "**.md" + - '**.md' - '!**/paths_ci.yml' pull_request: paths-ignore: - - "**.md" + - '**.md' - '!**/paths_ci.yml' concurrency: diff --git a/.github/workflows/prebuilt.yml b/.github/workflows/prebuilt.yml index b1e4e95389..1c4e6953c4 100644 --- a/.github/workflows/prebuilt.yml +++ b/.github/workflows/prebuilt.yml @@ -10,62 +10,62 @@ jobs: runs-on: ubuntu-20.04 timeout-minutes: 5 steps: - - name: Download V - run: | - wget https://github.com/vlang/v/releases/latest/download/v_linux.zip - unzip v_linux.zip - cd v - ./v -version - - name: Test V - run: | - cd v - ./v run examples/hello_world.v - ./v -showcc -gc none -cc tcc -no-retry-compilation run examples/hello_world.v + - name: Download V + run: | + wget https://github.com/vlang/v/releases/latest/download/v_linux.zip + unzip v_linux.zip + cd v + ./v -version + - name: Test V + run: | + cd v + ./v run examples/hello_world.v + ./v -showcc -gc none -cc tcc -no-retry-compilation run examples/hello_world.v macos-arm64: ## macos-14 is a m1 runner runs-on: macos-14 timeout-minutes: 5 steps: - - name: Download V - run: | - wget https://github.com/vlang/v/releases/latest/download/v_macos_arm64.zip - unzip v_macos_arm64.zip - cd v - ./v -version - - name: Test V - run: | - cd v - ./v run examples/hello_world.v - ./v -showcc -gc none -cc tcc -no-retry-compilation run examples/hello_world.v + - name: Download V + run: | + wget https://github.com/vlang/v/releases/latest/download/v_macos_arm64.zip + unzip v_macos_arm64.zip + cd v + ./v -version + - name: Test V + run: | + cd v + ./v run examples/hello_world.v + ./v -showcc -gc none -cc tcc -no-retry-compilation run examples/hello_world.v macos-x86_64: runs-on: macos-latest timeout-minutes: 5 steps: - - name: Download V - run: | - wget https://github.com/vlang/v/releases/latest/download/v_macos_x86_64.zip - unzip v_macos_x86_64.zip - cd v - ./v -version - - name: Test V - run: | - cd v - ./v run examples/hello_world.v + - name: Download V + run: | + wget https://github.com/vlang/v/releases/latest/download/v_macos_x86_64.zip + unzip v_macos_x86_64.zip + cd v + ./v -version + - name: Test V + run: | + cd v + ./v run examples/hello_world.v windows: runs-on: windows-latest timeout-minutes: 5 steps: - - name: Download V - run: | - curl -L https://github.com/vlang/v/releases/latest/download/v_windows.zip -o v_windows.zip - unzip .\v_windows.zip - cd v - .\v.exe -version - - name: Test V - run: | - cd v - .\v.exe run .\examples\hello_world.v - .\v.exe -showcc -gc none -cc tcc -no-retry-compilation run .\examples/hello_world.v + - name: Download V + run: | + curl -L https://github.com/vlang/v/releases/latest/download/v_windows.zip -o v_windows.zip + unzip .\v_windows.zip + cd v + .\v.exe -version + - name: Test V + run: | + cd v + .\v.exe run .\examples\hello_world.v + .\v.exe -showcc -gc none -cc tcc -no-retry-compilation run .\examples/hello_world.v diff --git a/.github/workflows/sanitized_ci.yml b/.github/workflows/sanitized_ci.yml index b0e18f1166..cd5ea0e446 100644 --- a/.github/workflows/sanitized_ci.yml +++ b/.github/workflows/sanitized_ci.yml @@ -147,8 +147,7 @@ jobs: - name: Self tests (-fsanitize=address) run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags "-fsanitize=address,pointer-compare,pointer-subtract" test-self vlib - name: Self tests (V compiled with -fsanitize=address) - run: - ./v -cflags -fsanitize=address -o v cmd/v && + run: ./v -cflags -fsanitize=address -o v cmd/v && ASAN_OPTIONS=detect_leaks=0 ./v -cc tcc test-self -asan-compiler vlib - name: Build examples (V compiled with -fsanitize=address) run: ASAN_OPTIONS=detect_leaks=0 ./v build-examples diff --git a/.github/workflows/vinix_ci.yml b/.github/workflows/vinix_ci.yml index c1acdfe420..6be90d6d8f 100644 --- a/.github/workflows/vinix_ci.yml +++ b/.github/workflows/vinix_ci.yml @@ -4,14 +4,14 @@ on: workflow_call: pull_request: paths-ignore: - - "**.md" + - '**.md' push: branches: - master paths-ignore: - - "**.md" - - "**.yml" - - "!**/vinix_ci.yml" + - '**.md' + - '**.yml' + - '!**/vinix_ci.yml' concurrency: group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} diff --git a/.github/workflows/workflow_lint.yml b/.github/workflows/workflow_lint.yml new file mode 100644 index 0000000000..b720ec6d2d --- /dev/null +++ b/.github/workflows/workflow_lint.yml @@ -0,0 +1,19 @@ +name: Workflow Lint + +on: + push: + paths: + - '**.yml' + pull_request: + paths: + - '**.yml' + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Verify formatting + uses: creyD/prettier_action@v4.3 + with: + prettier_options: --check .github/**/**.yml