-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflows that build tools on Mac OS and Windows (#19226)
Signed-off-by: Roman Tkachenko <[email protected]> Co-authored-by: Victor Sokolov <[email protected]>
- Loading branch information
1 parent
b4e1d5d
commit 91f7030
Showing
13 changed files
with
269 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This workflow is required to ensure that required Github check passes even if | ||
# the actual "Build on Mac OS" workflow skipped due to path filtering. Otherwise | ||
# it will stay forever pending. | ||
# | ||
# See "Handling skipped but required checks" for more info: | ||
# | ||
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks | ||
# | ||
# Note both workflows must have the same name. | ||
|
||
name: Build on Mac OS | ||
run-name: Skip Build on Mac OS | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- '**.go' | ||
- 'go.mod' | ||
- 'go.sum' | ||
- '**.rs' | ||
- 'Cargo.toml' | ||
- 'Cargo.lock' | ||
|
||
jobs: | ||
build: | ||
name: Skipped | ||
runs-on: macos-12 | ||
|
||
permissions: | ||
contents: none | ||
|
||
steps: | ||
- run: 'echo "No code changes"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build on Mac OS | ||
run-name: Build on Mac OS | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
paths: | ||
- '**.go' | ||
- 'go.mod' | ||
- 'go.sum' | ||
- '**.rs' | ||
- 'Cargo.toml' | ||
- 'Cargo.lock' | ||
|
||
jobs: | ||
build: | ||
name: Build all tools on Mac OS | ||
runs-on: macos-12 # TODO(r0mant): Update with large runner when it's available | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout Teleport | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Go version | ||
id: go-version | ||
shell: bash | ||
run: echo "go-version=$(make --no-print-directory print-go-version | tr -d '\n')" >> $GITHUB_OUTPUT | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ steps.go-version.outputs.go-version }} | ||
|
||
- name: Build | ||
run: make binaries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This workflow is required to ensure that required Github check passes even if | ||
# the actual "Build on Windows" workflow skipped due to path filtering. Otherwise | ||
# it will stay forever pending. | ||
# | ||
# See "Handling skipped but required checks" for more info: | ||
# | ||
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks | ||
# | ||
# Note both workflows must have the same name. | ||
|
||
name: Build on Windows | ||
run-name: Skip Build on Windows | ||
|
||
on: | ||
pull_request: | ||
# We only build tsh on Windows so only consider Go code as tsh doesn't | ||
# run any Rust. | ||
paths-ignore: | ||
- '**.go' | ||
- 'go.mod' | ||
- 'go.sum' | ||
|
||
jobs: | ||
build: | ||
name: Skipped | ||
runs-on: windows-latest | ||
|
||
permissions: | ||
contents: none | ||
|
||
steps: | ||
- run: 'echo "No code changes"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build on Windows | ||
run-name: Build on Windows | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
# We only build tsh on Windows so only consider Go code as tsh doesn't | ||
# run any Rust. | ||
paths: | ||
- '**.go' | ||
- 'go.mod' | ||
- 'go.sum' | ||
|
||
jobs: | ||
build: | ||
name: Build tsh tool on Windows | ||
runs-on: windows-2022-16core | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout Teleport | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Go version | ||
id: go-version | ||
shell: bash | ||
run: echo "go-version=$(make --no-print-directory print-go-version | tr -d '\n')" >> $GITHUB_OUTPUT | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ steps.go-version.outputs.go-version }} | ||
|
||
- name: Build | ||
run: | | ||
$Env:OS="windows" | ||
make build/tsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This workflow is required to ensure that required Github check passes even if | ||
# the actual "Integration Tests (Non-root)" workflow skipped due to path filtering. | ||
# Otherwise it will stay forever pending. | ||
# | ||
# See "Handling skipped but required checks" for more info: | ||
# | ||
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks | ||
# | ||
# Note both workflows must have the same name. | ||
|
||
name: Integration Tests (Non-root) | ||
run-name: Skip Integration Tests (Non-root) - ${{ github.run_id }} - @${{ github.actor }} | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- '**.go' | ||
- 'go.mod' | ||
- 'go.sum' | ||
|
||
jobs: | ||
test: | ||
name: Skipped | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: none | ||
|
||
steps: | ||
- run: 'echo "No changes to verify"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This workflow is required to ensure that required Github check passes even if | ||
# the actual "Integration Tests (Root)" workflow skipped due to path filtering. | ||
# Otherwise it will stay forever pending. | ||
# | ||
# See "Handling skipped but required checks" for more info: | ||
# | ||
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks | ||
# | ||
# Note both workflows must have the same name. | ||
|
||
name: Integration Tests (Root) | ||
run-name: Skip Integration Tests (Root) - ${{ github.run_id }} - @${{ github.actor }} | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- '**.go' | ||
- 'go.mod' | ||
- 'go.sum' | ||
|
||
jobs: | ||
test: | ||
name: Skipped | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: none | ||
|
||
steps: | ||
- run: 'echo "No changes to verify"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters