Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/build-llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- os: windows-2025
llvm_mode: RelWithDebInfo
lto: ON

- os: ubuntu-24.04
llvm_mode: Debug
lto: OFF
Expand All @@ -31,7 +30,6 @@ jobs:
- os: ubuntu-24.04
llvm_mode: RelWithDebInfo
lto: ON

- os: macos-15
llvm_mode: Debug
lto: OFF
Expand All @@ -41,9 +39,7 @@ jobs:
- os: macos-15
llvm_mode: RelWithDebInfo
lto: ON

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: format

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:

permissions:
contents: read
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: deploy

on:
workflow_call:

jobs:
deploy-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
pixi-version: v0.61.0
environments: node
activate-environment: true
cache: true
locked: true

- name: Build docs
run: pixi run build-docs

- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist
cname: clice.io
Comment thread
16bit-ykiko marked this conversation as resolved.
Resolved
43 changes: 0 additions & 43 deletions .github/workflows/deploy.yml

This file was deleted.

112 changes: 112 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: main

on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]

jobs:
changes:
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
format: ${{ steps.filter.outputs.format }}
docs: ${{ steps.filter.outputs.docs }}
clice: ${{ steps.filter.outputs.clice }}
vscode: ${{ steps.filter.outputs.vscode }}
cmake: ${{ steps.filter.outputs.cmake }}
xmake: ${{ steps.filter.outputs.xmake }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
format:
- '**/*.{h,c,cpp,hpp,ts,js,lua,md,yml,yaml}'
docs:
- 'docs/**'
- '.github/workflows/deploy-docs.yml'
clice:
- 'src/**'
- 'include/**'
- 'CMakeLists.txt'
- '.github/workflows/publish-clice.yml'
vscode:
- 'editors/vscode/**'
- '.github/workflows/publish-vscode.yml'
cmake:
- 'CMakeLists.txt'
- 'src/**'
- 'include/**'
- 'tests/**'
- 'config/**'
- '.github/workflows/test-cmake.yml'
xmake:
- 'xmake.lua'
- 'src/**'
- 'include/**'
- 'tests/**'
- 'config/**'
- '.github/workflows/test-xmake.yml'

call-format:
needs: changes
if: ${{ needs.changes.outputs.format == 'true' }}
uses: ./.github/workflows/format.yml

call-deploy-docs:
needs: changes
if: ${{ needs.changes.outputs.docs == 'true' }}
permissions:
contents: write
uses: ./.github/workflows/deploy-docs.yml

call-clice-check:
needs: changes
if: ${{ needs.changes.outputs.clice == 'true' }}
uses: ./.github/workflows/publish-clice.yml

call-vscode-check:
needs: changes
if: ${{ needs.changes.outputs.vscode == 'true' }}
uses: ./.github/workflows/publish-vscode.yml

call-cmake-test:
needs: changes
if: ${{ needs.changes.outputs.cmake == 'true' }}
uses: ./.github/workflows/test-cmake.yml

call-xmake-test:
needs: changes
if: ${{ needs.changes.outputs.xmake == 'true' }}
uses: ./.github/workflows/test-xmake.yml

release-clice:
if: startsWith(github.ref, 'refs/tags/v')
uses: ./.github/workflows/publish-clice.yml
secrets: inherit

release-vscode:
if: startsWith(github.ref, 'refs/tags/v')
uses: ./.github/workflows/publish-vscode.yml
secrets: inherit

ci-passed:
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
needs:
- call-format
- call-deploy-docs
- call-clice-check
- call-vscode-check
- call-cmake-test
- call-xmake-test
runs-on: ubuntu-latest
steps:
- name: Check results
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
Comment thread
16bit-ykiko marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
name: package
name: clice

permissions:
contents: write

on:
push:
tags:
- "v*"

pull_request:
branches: [main]
paths:
- ".github/workflows/package.yml"
workflow_call:

jobs:
package:
publish-clice:
strategy:
fail-fast: false
matrix:
Expand All @@ -24,21 +17,18 @@ jobs:
asset_name: clice-x64-windows-msvc.zip
symbol_artifact_name: clice-symbol.zip
symbol_asset_name: clice-x64-windows-msvc-symbol.zip
toolchain: clang-cl

- os: ubuntu-24.04
artifact_name: clice.tar.gz
asset_name: clice-x86_64-linux-gnu.tar.gz
symbol_artifact_name: clice-symbol.tar.gz
symbol_asset_name: clice-x86_64-linux-gnu-symbol.tar.gz
toolchain: clang-20

- os: macos-15
artifact_name: clice.tar.gz
asset_name: clice-arm64-macos-darwin.tar.gz
symbol_artifact_name: clice-symbol.tar.gz
symbol_asset_name: clice-arm64-macos-darwin-symbol.tar.gz
toolchain: clang

runs-on: ${{ matrix.os }}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,48 +1,38 @@
name: CI/CD VS Code Extension
name: vscode

on:
push:
tags: ["v*"]
branches: ["main"]
paths: ["editors/vscode/**"]
pull_request:
branches: ["main"]
paths: ["editors/vscode/**"]
workflow_call:

jobs:
publish:
publish-vscode:
runs-on: ubuntu-latest
permissions:
contents: write

defaults:
run:
working-directory: editors/vscode

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
node-version: "20"

- name: Install dependencies
run: npm ci

- name: Install vsce
run: npm install -g vsce
pixi-version: v0.61.0
environments: node
activate-environment: true
cache: true
locked: true
Comment thread
16bit-ykiko marked this conversation as resolved.
Resolved

- name: Publish and Package to Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: |
FLAG="${{ contains(github.ref_name, '-') && '--pre-release' || '' }}"
npm run package -- $FLAG
pixi run build-vscode $FLAG

if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
npm run publish -- -p "$VSCE_PAT" $FLAG
pixi run publish-vscode -p "$VSCE_PAT" $FLAG
fi

- name: Upload .vsix to Release
Expand Down
27 changes: 3 additions & 24 deletions .github/workflows/cmake.yml → .github/workflows/test-cmake.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
name: cmake

on:
push:
branches: [main]
paths:
- ".github/workflows/cmake.yml"
- "include/**"
- "src/**"
- "tests/**"
- "CMakeLists.txt"

pull_request:
branches: [main]
paths:
- ".github/workflows/cmake.yml"
- "include/**"
- "src/**"
- "tests/**"
- "config/**"
- "CMakeLists.txt"
workflow_call:

jobs:
build:
Expand All @@ -32,9 +15,7 @@ jobs:
build_type: Debug
- os: macos-15
build_type: Debug

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -49,9 +30,7 @@ jobs:
locked: true

- name: Build
run: |
pixi run ci-cmake-build ${{ matrix.build_type }}
run: pixi run ci-cmake-build ${{ matrix.build_type }}

- name: Test
run: |
pixi run ci-cmake-test
run: pixi run ci-cmake-test
Loading