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

Setup a nightly build job #1251

Merged
merged 10 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 9 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
56 changes: 56 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Nightly

on:
schedule:
- cron: "0 0 * * *"

jobs:
tests_release:
name: Test Release
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
with:
# Linux
linux_env_vars: |
NODE_VERSION=v18.19.0
NODE_PATH=/usr/local/nvm/versions/node/v18.19.0/bin
NVM_DIR=/usr/local/nvm
CI=1
linux_pre_build_command: |
apt-get update && apt-get install -y rsync curl gpg libasound2 libgbm1 libgtk-3-0 libnss3 xvfb build-essential
mkdir -p $NVM_DIR
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
/bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION"
echo "$NODE_PATH" >> $GITHUB_PATH
linux_build_command: ./docker/test.sh
# Windows
windows_env_vars: |
CI=1
VSCODE_TEST=1
windows_pre_build_command: .github\workflows\scripts\windows\install-nodejs.ps1
windows_build_command: docker\test-windows.ps1
enable_windows_docker: false

tests_insiders:
name: Test Insiders
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
with:
# Linux
linux_exclude_swift_versions: '[{"swift_version": "5.8"}, {"swift_version": "5.9"}, {"swift_version": "5.10"}, {"swift_version": "nightly-6.0"}, {"swift_version": "nightly-main"}]'
linux_env_vars: |
NODE_VERSION=v18.19.0
NODE_PATH=/usr/local/nvm/versions/node/v18.19.0/bin
NVM_DIR=/usr/local/nvm
CI=1
VSCODE_TEST=1
VSCODE_VERSION=insiders
linux_pre_build_command: . .github/workflows/scripts/setup-linux.sh
linux_build_command: ./docker/test.sh
# Windows
windows_exclude_swift_versions: '[{"swift_version": "5.9"}, {"swift_version": "nightly-6.0"}, {"swift_version": "nightly"}]'
windows_env_vars: |
CI=1
VSCODE_TEST=1
VSCODE_VERSION=insiders
windows_pre_build_command: .github\workflows\scripts\windows\install-nodejs.ps1
windows_build_command: docker\test-windows.ps1
enable_windows_docker: false
12 changes: 4 additions & 8 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,18 @@ jobs:
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
with:
# Linux
linux_exclude_swift_versions: '[{"swift_version": "nightly-main"}]'
linux_exclude_swift_versions: '[{"swift_version": "nightly-6.0"},{"swift_version": "nightly-main"}]'
linux_env_vars: |
NODE_VERSION=v18.19.0
NODE_PATH=/usr/local/nvm/versions/node/v18.19.0/bin
NVM_DIR=/usr/local/nvm
CI=1
VSCODE_TEST=1
FAST_TEST_RUN=1
linux_pre_build_command: |
apt-get update && apt-get install -y rsync curl gpg libasound2 libgbm1 libgtk-3-0 libnss3 xvfb build-essential
mkdir -p $NVM_DIR
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
/bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION"
echo "$NODE_PATH" >> $GITHUB_PATH
linux_pre_build_command: . .github/workflows/scripts/setup-linux.sh
linux_build_command: ./docker/test.sh
# Windows
windows_exclude_swift_versions: '[{"swift_version": "nightly"}]'
windows_exclude_swift_versions: '[{"swift_version": "nightly-6.0"},{"swift_version": "nightly"}]'
windows_env_vars: |
CI=1
VSCODE_TEST=1
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/scripts/setup-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the VS Code Swift open source project
##
## Copyright (c) 2024 the VS Code Swift project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of VS Code Swift project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##

export NODE_VERSION=v18.19.0
export NODE_PATH=/usr/local/nvm/versions/node/v18.19.0/bin
export NVM_DIR=/usr/local/nvm

apt-get update && apt-get install -y rsync curl gpg libasound2 libgbm1 libgtk-3-0 libnss3 xvfb build-essential
mkdir -p $NVM_DIR
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
/bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION"
echo "$NODE_PATH" >> "$GITHUB_PATH"
Loading