Skip to content

Commit

Permalink
ci: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Dec 22, 2024
1 parent 44034bd commit 1694672
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 16 deletions.
45 changes: 36 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,49 @@ jobs:
uses: actions/checkout@v4
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v1
- name: Set up examples
run: |-
git clone https://github.com/odin-lang/Odin examples/Odin --single-branch --depth=1 --filter=blob:none
- name: Run tests
uses: tree-sitter/parser-test-action@v2
with:
test-rust: ${{runner.os == 'Linux'}}
test-rust: true
test-node: true
test-python: true
test-go: true
test-swift: true
- name: Set up examples
run: |-
git clone https://github.com/odin-lang/Odin examples/Odin --single-branch --depth=1 --filter=blob:none
- name: Parse examples
id: examples
continue-on-error: true
uses: tree-sitter/parse-action@v4
with:
files: examples/**/*.odin
invalid-files: |
examples/Odin/core/math/linalg/specific.odin
examples/Odin/core/runtime/internal.odin
# FIXME: The last 7 files only fail on Windows
files: |
examples/**/*.odin
!examples/Odin/base/intrinsics/intrinsics.odin
!examples/Odin/base/runtime/internal.odin
!examples/Odin/core/crypto/_fiat/field_curve25519/field.odin
!examples/Odin/core/debug/trace/trace_cpp.odin
!examples/Odin/core/encoding/cbor/marshal.odin
!examples/Odin/core/math/linalg/specific.odin
!examples/Odin/core/mem/allocators.odin
!examples/Odin/core/os/os2/process_windows.odin
!examples/Odin/core/sync/chan/chan.odin
!examples/Odin/core/sys/linux/bits.odin
!examples/Odin/core/sys/posix/fcntl.odin
!examples/Odin/core/testing/runner.odin
!examples/Odin/core/text/regex/common/common.odin
!examples/Odin/tests/core/encoding/json/test_core_json.odin
!examples/Odin/vendor/raylib/raygui.odin
!examples/Odin/vendor/raylib/raylib.odin
!examples/Odin/vendor/raylib/rlgl/rlgl.odin
!examples/Odin/base/runtime/wasm_allocator.odin
!examples/Odin/core/hash/xxhash/xxhash_3.odin
!examples/Odin/core/image/netpbm/netpbm.odin
!examples/Odin/core/sys/posix/netinet_in.odin
!examples/Odin/core/sys/windows/kernel32.odin
!examples/Odin/core/sys/windows/types.odin
!examples/Odin/tests/vendor/glfw/test_vendor_glfw.odin
- uses: actions/upload-artifact@v4
if: steps.examples.outputs.failures != ''
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ jobs:
uses: actions/checkout@v4
- name: Run fuzzer
uses: tree-sitter/fuzz-action@v4
with:
tree-sitter-version: v0.22.2
24 changes: 19 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
name: Publish package
name: Publish packages

on:
push:
tags: ["*"]

permissions:
contents: write
id-token: write
attestations: write

jobs:
github:
uses: tree-sitter/workflows/.github/workflows/release.yml@main
with:
generate: true
attestations: true
npm:
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main
with:
package-name: "@tree-sitter-grammars/tree-sitter-yaml"
secrets:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
with:
generate: true
crates:
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
secrets:
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}}
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}}
with:
generate: true
pypi:
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main
secrets:
PYPI_API_TOKEN: ${{secrets.PYPI_TOKEN}}
PYPI_API_TOKEN: ${{secrets.PYPI_API_TOKEN}}
with:
generate: true

0 comments on commit 1694672

Please sign in to comment.