Skip to content

Commit

Permalink
Add a cron schedule to run weekly. (#134)
Browse files Browse the repository at this point in the history
* Add cron job

* Add cron job

* Upgrade linter action

* Linter fixes
  • Loading branch information
rhurey committed Sep 10, 2024
1 parent 20ae0eb commit 77f854a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
ln -s SpeechSDK-Linux-$CARBON_VERSION current
popd
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v5
env:
CGO_CFLAGS: "-I/tmp/carbon/current/include/c_api"
CGO_LDFLAGS: "-L/tmp/carbon/current/lib/x64 -lMicrosoft.CognitiveServices.Speech.core"
20 changes: 17 additions & 3 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
trigger:
- master

resources:
- repo: self
clean: true

trigger:
branches:
include:
- master

schedules:
- cron: "0 18 * * 6"
displayName: "Saturday Evening Schedule"
branches:
include:
- master

pool:
vmImage: ubuntu-latest
variables:
CARBON_VERSION: "1.33.0"
CARBON_VERSION: "1.40.0"

steps:
- task: GoTool@0
Expand Down
6 changes: 3 additions & 3 deletions speaker/voice_profile_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ func (client VoiceProfileClient) GetAllProfilesAsync(profileType common.VoicePro
outcome <- GetAllProfilesOutcome{Profiles: nil, OperationOutcome: common.OperationOutcome{common.NewCarbonError(uintptr(C.SPXERR_INVALID_ARG))}}
} else {
goProfilesJSON := C.GoString((*C.char)(rawProfileJSON))
splitProfileIds := strings.Split(goProfilesJSON, "|")
profileList := make([]*VoiceProfile, len(splitProfileIds))
for index, id := range splitProfileIds {
splitProfileIDs := strings.Split(goProfilesJSON, "|")
profileList := make([]*VoiceProfile, len(splitProfileIDs))
for index, id := range splitProfileIDs {
profile, err := NewVoiceProfileFromIdAndType(id, profileType)
if err != nil {
outcome <- GetAllProfilesOutcome{Profiles: nil, OperationOutcome: common.OperationOutcome{err}}
Expand Down

0 comments on commit 77f854a

Please sign in to comment.