Skip to content

Commit

Permalink
feat: add task
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyoucao577 committed Dec 17, 2024
1 parent fe2beb6 commit ded50a0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "azure_tts",
"image": "ghcr.io/ten-framework/ten_agent_build:0.2.2",
"image": "ghcr.io/ten-framework/ten_agent_build:0.3.2",
"customizations": {
"vscode": {
"extensions": [
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
matrix:
build_type: [debug, release]
container:
image: ghcr.io/ten-framework/ten_agent_build:0.2.2
image: ghcr.io/ten-framework/ten_agent_build:0.3.2
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -48,9 +48,7 @@ jobs:
- name: Build
run: |
tman install
tgn gen linux x64 ${{ matrix.build_type }} -- is_clang=false
tgn build linux x64 ${{ matrix.build_type }}
task build -- BUILD_TYPE=${{ matrix.build_type }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ TEN extension of [azure Text to speech service](https://learn.microsoft.com/en-u
Only `linux/amd64` building inside container is supported at the moment.

```bash
# inside docker ghcr.io/ten-framework/ten_agent_build:0.2.2
# inside docker ghcr.io/ten-framework/ten_agent_build:0.3.2

tman install
tgn gen linux x64 debug -- is_clang=false && tgn build linux x64 debug
tgn gen linux x64 release -- is_clang=false && tgn build linux x64 release
task build
```

Refer to [ci](.github/workflows/ci.yml) for more details.
Expand Down
26 changes: 26 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '3'

tasks:
clean:
desc: clean up
cmds:
- rm -rf out .ten .gnfiles .gn compile_commands.json

build:
desc: build, with optional 'BUILD_TYPE=debug/release'
vars:
BUILD_TYPE: '{{ .BUILD_TYPE | default "release" }}'
cmds:
- task: install
- tgn gen linux x64 {{ .BUILD_TYPE }} -- is_clang=false {{ .CLI_ARGS }}
- tgn build linux x64 {{ .BUILD_TYPE }}

test:
desc: run tests
cmds:
- echo TODO

install:
desc: install dependencies
cmds:
- tman install

0 comments on commit ded50a0

Please sign in to comment.