Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#32) Add a build pipeline #42

Merged
merged 4 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
(#32) Adjust CI builds
Add the configuration for building on Team City and GitHub Actions. Also
remove the AppVeyor configuration.
  • Loading branch information
corbob committed Mar 8, 2024
commit aeee1d0516a39358988152656b8bb12e5d211d31
33 changes: 33 additions & 0 deletions .github/workflows/build-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Chocolatey-AU Builds

on:
# Trigger on pushes and on pull requests
push:
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
# Build on Windows
windows-build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache Tools
uses: actions/cache@v3.0.11
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
- name: Build Chocolatey-AU module
run: .\build.ps1 -Task CI -Verbose -ErrorAction Stop
- name: Upload Windows build results
uses: actions/upload-artifact@v3
# Always upload build results
if: ${{ always() }}
with:
name: build-results
path: |
code_drop/**
73 changes: 73 additions & 0 deletions .teamcity/settings.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import jetbrains.buildServer.configs.kotlin.v2019_2.*
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.PullRequests
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.powerShell
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs

project {
buildType(ChocolateyAU)
}

object ChocolateyAU : BuildType({
id = AbsoluteId("ChocolateyAU")
name = "Build"

artifactRules = """
+:code_drop/**
""".trimIndent()

params {
param("env.vcsroot.branch", "%vcsroot.branch%")
param("env.Git_Branch", "%teamcity.build.vcs.branch.ChocolateyAU_ChocolateyAUVcsRoot%")
param("teamcity.git.fetchAllHeads", "true")
password("env.GITHUB_PAT", "%system.GitHubPAT%", display = ParameterDisplay.HIDDEN, readOnly = true)
}

vcs {
root(DslContext.settingsRoot)

branchFilter = """
+:*
""".trimIndent()
}

steps {
step {
name = "Include Signing Keys"
type = "PrepareSigningEnvironment"
}
powerShell {
name = "Build Module"
formatStderrAsError = true
scriptMode = script {
content = """
try {
& .\build.ps1 -Task CI -Verbose -ErrorAction Stop
}
catch {
${'$'}_ | Out-String | Write-Host -ForegroundColor Red
exit 1
}
""".trimIndent()
}
noProfile = false
param("jetbrains_powershell_script_file", "build.ps1")
}
}

triggers {
vcs {
branchFilter = ""
}
}

features {
pullRequests {
provider = github {
authType = token {
token = "%system.GitHubPAT%"
}
}
}
}
})
40 changes: 0 additions & 40 deletions appveyor.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite alot of users make use of AU through AppVeyor, it might be best to keep such a build for AppVeyor around purely for testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure what would be needed to have AppVeyor work on this repository. I imagine it's a little bit more complex than just updating this file.

I would not be opposed to leaving the configuration file there for adding AppVeyor builds in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets leave it as is for now, and perhaps create a followup issue for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created issue #43 off of this. I'll go back to it after this PR is merged and link directly to the commit that removes the appveyor.yaml file to make it easy to locate in the future.

This file was deleted.