-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Port] Porting pipeline fixes (#25178)
* Codesign unis000.exe with ESRP client (#25089) * update version to 1.41.3 * Use python 3.11.x in GitHub workflows (#25019) (#25113) * Use python v3.11 for Darwin (#24976) (#25115) Co-authored-by: Lewis Sanchez <87730006+lewis-sanchez@users.noreply.github.com> * Updating signing tasks to use .NET 6 (#25021) (#25160) * Updating signing tasks to EsrpCodeSigning@3 * Updating .NET versions * removing UseDotNet steps * Restoring UseDotNet for linux builds Co-authored-by: Benjin Dubishar <benjin.dubishar@gmail.com> * Use python 3.11 (#24646) * Fix duplicate setup-python in windows ci * change node version back to 16 for github workflows --------- Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com> Co-authored-by: Lewis Sanchez <87730006+lewis-sanchez@users.noreply.github.com> Co-authored-by: Benjin Dubishar <benjin.dubishar@gmail.com>
- Loading branch information
1 parent
0f0960d
commit bc93a12
Showing
8 changed files
with
309 additions
and
58 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,190 @@ | ||
name: Basic checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
main: | ||
if: github.ref != 'refs/heads/main' | ||
name: Compilation, Unit and Integration Tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 40 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11.x" | ||
|
||
# TODO: rename azure-pipelines/linux/xvfb.init to github-actions | ||
- name: Setup Build Environment | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libkrb5-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 | ||
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb | ||
sudo chmod +x /etc/init.d/xvfb | ||
sudo update-rc.d xvfb defaults | ||
sudo service xvfb start | ||
- name: Compute node modules cache key | ||
id: nodeModulesCacheKey | ||
run: echo "value=$(node build/azure-pipelines/common/sql-computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT | ||
- name: Cache node modules | ||
id: cacheNodeModules | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-cacheNodeModules23-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
restore-keys: ${{ runner.os }}-cacheNodeModules23- | ||
- name: Get yarn cache directory path | ||
id: yarnCacheDirPath | ||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
- name: Cache yarn directory | ||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarnCacheDirPath.outputs.dir }} | ||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
restore-keys: ${{ runner.os }}-yarnCacheDir- | ||
- name: Execute yarn | ||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
env: | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1 | ||
run: yarn --frozen-lockfile --network-timeout 180000 | ||
|
||
- name: Compile and Download | ||
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" | ||
|
||
- name: Run Unit Tests | ||
id: electron-unit-tests | ||
run: DISPLAY=:10 ./scripts/test.sh | ||
|
||
- name: Run Integration Tests (Electron) | ||
id: electron-integration-tests | ||
run: DISPLAY=:10 ./scripts/test-integration.sh | ||
|
||
hygiene: | ||
if: github.ref != 'refs/heads/main' | ||
name: Hygiene and Layering | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 40 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11.x" | ||
|
||
- name: Compute node modules cache key | ||
id: nodeModulesCacheKey | ||
# {{ SQL Carbon Edit}} Use sql-computeNodeModulesCacheKey | ||
run: echo "value=$(node build/azure-pipelines/common/sql-computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT | ||
- name: Cache node modules | ||
id: cacheNodeModules | ||
uses: actions/cache@v3 | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.os }}-cacheNodeModules20-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
restore-keys: ${{ runner.os }}-cacheNodeModules20- | ||
- name: Get yarn cache directory path | ||
id: yarnCacheDirPath | ||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
- name: Cache yarn directory | ||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarnCacheDirPath.outputs.dir }} | ||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
restore-keys: ${{ runner.os }}-yarnCacheDir- | ||
- name: Install libkrb5-dev | ||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
run: sudo apt install -y libkrb5-dev | ||
- name: Execute yarn | ||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
env: | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1 | ||
run: yarn --frozen-lockfile --network-timeout 180000 | ||
|
||
- name: Run Hygiene Checks | ||
run: yarn gulp hygiene | ||
|
||
- name: Run Valid Layers Checks | ||
run: yarn valid-layers-check | ||
|
||
- name: Compile /build/ | ||
run: yarn --cwd build compile | ||
|
||
- name: Check clean git state | ||
run: ./.github/workflows/check-clean-git-state.sh | ||
|
||
- name: Run eslint | ||
run: yarn eslint | ||
|
||
# {{SQL CARBON EDIT}} Add linting for our folders | ||
- name: Run sqllint | ||
run: yarn sqllint | ||
|
||
- name: Run vscode-dts Compile Checks | ||
run: yarn vscode-dts-compile-check | ||
|
||
- name: Run Trusted Types Checks | ||
run: yarn tsec-compile-check | ||
|
||
# {{SQL CARBON TODO}} Update node modules caching to work with our cache keys | ||
# warm-cache: | ||
# name: Warm up node modules cache | ||
# if: github.ref == 'refs/heads/main' | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 40 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: 18.15 | ||
|
||
# - name: Compute node modules cache key | ||
# id: nodeModulesCacheKey | ||
# run: echo "value=$(node build/azure-pipelines/common/sql-computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT | ||
# - name: Cache node modules | ||
# id: cacheNodeModules | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: "**/node_modules" | ||
# key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
# - name: Get yarn cache directory path | ||
# id: yarnCacheDirPath | ||
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
# run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
# - name: Cache yarn directory | ||
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: ${{ steps.yarnCacheDirPath.outputs.dir }} | ||
# key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
# restore-keys: ${{ runner.os }}-yarnCacheDir- | ||
# - name: Execute yarn | ||
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
# env: | ||
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
# ELECTRON_SKIP_BINARY_DOWNLOAD: 1 | ||
# run: yarn --frozen-lockfile --network-timeout 180000 |
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
Oops, something went wrong.