Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
Self-hosted CI runners (#1841)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwu-tow authored Sep 22, 2021
1 parent 883146e commit 535976e
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 166 deletions.
158 changes: 82 additions & 76 deletions .github/workflows/gui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,36 @@ name: GUI CI
- unstable
- stable
pull_request: {}
workflow_dispatch: {}
jobs:
info:
name: Build Info
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os:
- macOS-latest
runner:
- - macOS-latest
fail-fast: false
steps:
- uses: actions/checkout@v1
with:
clean: false
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
version_assertions:
name: Assertions
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os:
- macOS-latest
runner:
- - macOS-latest
fail-fast: false
steps:
- uses: actions/checkout@v1
with:
clean: false
- name: Read changelog info
id: changelog
run: |2-
Expand Down Expand Up @@ -89,14 +94,17 @@ jobs:
}}" == "stable" ]]; then exit 1; fi
lint:
name: Linter
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os:
- macOS-latest
runner:
- - Linux
- linter
fail-fast: false
steps:
- uses: actions/checkout@v1
with:
clean: false
- name: Install Node
uses: actions/setup-node@v1
with:
Expand All @@ -119,15 +127,18 @@ jobs:
- name: Lint Rust sources
run: node ./run lint --skip-version-validation
test:
name: Tests
runs-on: ${{ matrix.os }}
name: Native Tests
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os:
- macOS-latest
runner:
- - Linux
- test_native
fail-fast: false
steps:
- uses: actions/checkout@v1
with:
clean: false
- name: Install Node
uses: actions/setup-node@v1
with:
Expand All @@ -143,14 +154,17 @@ jobs:
run: node ./run test --no-wasm --skip-version-validation
wasm-test:
name: WASM Tests
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os:
- macOS-latest
runner:
- - Linux
- test_wasm
fail-fast: false
steps:
- uses: actions/checkout@v1
with:
clean: false
- name: Install Node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -197,16 +211,19 @@ jobs:
if: startsWith(matrix.os,'ubuntu')
- name: Run tests (WASM)
run: node ./run test --no-native --skip-version-validation
simple_build:
name: Simple Build (WASM size limit check)
runs-on: ${{ matrix.os }}
build_wasm:
name: Build WASM
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os:
- macOS-latest
runner:
- - Linux
- build_wasm
fail-fast: false
steps:
- uses: actions/checkout@v1
with:
clean: false
- name: Install Node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -255,28 +272,28 @@ jobs:
with:
distribution: adopt
java-version: '11'
- name: Build (macos)
env:
CSC_LINK: ${{secrets.APPLE_CODE_SIGNING_CERT}}
CSC_KEY_PASSWORD: ${{secrets.APPLE_CODE_SIGNING_CERT_PASSWORD}}
CSC_IDENTITY_AUTO_DISCOVERY: true
APPLEID: ${{secrets.APPLE_NOTARIZATION_USERNAME}}
APPLEIDPASS: ${{secrets.APPLE_NOTARIZATION_PASSWORD}}
FIREBASE_API_KEY: ${{secrets.FIREBASE_API_KEY}}
run: node ./run dist --skip-version-validation --target macos
if: startsWith(matrix.os,'macos')
build:
name: Build
runs-on: ${{ matrix.os }}
- name: Build WASM
run: node ./run build --no-js --skip-version-validation
- name: Upload IDE WASM artifacts
uses: actions/upload-artifact@v2
with:
name: ide-wasm
path: dist/wasm
package:
name: Build package
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os:
- windows-latest
- macOS-latest
- ubuntu-latest
runner:
- - macOS-latest
- - windows-latest
- - Linux
- package
fail-fast: false
steps:
- uses: actions/checkout@v1
with:
clean: false
- name: Read changelog info
id: changelog
run: |2-
Expand Down Expand Up @@ -334,96 +351,83 @@ jobs:
with:
distribution: adopt
java-version: '11'
- name: Build (macos)
- name: Download IDE WASM artifacts
uses: actions/download-artifact@v2
with:
name: ide-wasm
path: dist/wasm
- name: Build Package
run: node ./run dist --no-rust --skip-version-validation
shell: bash
env:
CSC_LINK: ${{secrets.APPLE_CODE_SIGNING_CERT}}
CSC_KEY_PASSWORD: ${{secrets.APPLE_CODE_SIGNING_CERT_PASSWORD}}
CSC_IDENTITY_AUTO_DISCOVERY: true
APPLEID: ${{secrets.APPLE_NOTARIZATION_USERNAME}}
APPLEIDPASS: ${{secrets.APPLE_NOTARIZATION_PASSWORD}}
FIREBASE_API_KEY: ${{secrets.FIREBASE_API_KEY}}
run: node ./run dist --skip-version-validation --target macos
if: startsWith(matrix.os,'macos')
- name: Build (win)
env:
WIN_CSC_LINK: ${{secrets.MICROSOFT_CODE_SIGNING_CERT}}
WIN_CSC_KEY_PASSWORD: ${{secrets.MICROSOFT_CODE_SIGNING_CERT_PASSWORD}}
FIREBASE_API_KEY: ${{secrets.FIREBASE_API_KEY}}
run: node ./run dist --skip-version-validation --target win
if: startsWith(matrix.os,'windows')
- name: Build (linux)
env:
FIREBASE_API_KEY: ${{secrets.FIREBASE_API_KEY}}
run: node ./run dist --skip-version-validation --target linux
if: startsWith(matrix.os,'ubuntu')
- name: Upload Content Artifacts
uses: actions/upload-artifact@v1
with:
name: content
path: dist/content
if: startsWith(matrix.os,'macOS')
- name: Upload Artifacts (macOS, dmg)
uses: actions/upload-artifact@v1
with:
name: enso-mac-${{fromJson(steps.changelog.outputs.content).version}}.dmg
path: >-
dist/client/enso-mac-${{fromJson(steps.changelog.outputs.content).version}}.dmg
if: startsWith(matrix.os,'macos')
if: runner.os == 'macOS'
- name: Upload Artifacts (macOS, dmg.sha256)
uses: actions/upload-artifact@v1
with:
name: >-
enso-mac-${{fromJson(steps.changelog.outputs.content).version}}.dmg.sha256
path: >-
dist/client/enso-mac-${{fromJson(steps.changelog.outputs.content).version}}.dmg.sha256
if: startsWith(matrix.os,'macos')
if: runner.os == 'macOS'
- name: Upload Artifacts (Windows, exe)
uses: actions/upload-artifact@v1
with:
name: enso-win-${{fromJson(steps.changelog.outputs.content).version}}.exe
path: >-
dist/client/enso-win-${{fromJson(steps.changelog.outputs.content).version}}.exe
if: startsWith(matrix.os,'windows')
if: runner.os == 'Windows'
- name: Upload Artifacts (Windows, exe.sha256)
uses: actions/upload-artifact@v1
with:
name: >-
enso-win-${{fromJson(steps.changelog.outputs.content).version}}.exe.sha256
path: >-
dist/client/enso-win-${{fromJson(steps.changelog.outputs.content).version}}.exe.sha256
if: startsWith(matrix.os,'windows')
if: runner.os == 'Windows'
- name: Upload Artifacts (Linux, AppImage)
uses: actions/upload-artifact@v1
with:
name: >-
enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage
path: >-
dist/client/enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage
if: startsWith(matrix.os,'ubuntu')
if: runner.os == 'Linux'
- name: Upload Artifacts (Linux, AppImage.sha256)
uses: actions/upload-artifact@v1
with:
name: >-
enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage.sha256
path: >-
dist/client/enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage.sha256
if: startsWith(matrix.os,'ubuntu')
if: >-
contains(github.event.pull_request.body,'[ci build]') ||
contains(github.event.head_commit.message,'[ci build]') || github.ref ==
'refs/heads/develop' || github.base_ref == 'unstable' || github.base_ref
== 'stable' || (github.ref == 'refs/heads/unstable' || github.ref ==
'refs/heads/stable')
if: runner.os == 'Linux'
needs:
- build_wasm
release_to_github:
name: GitHub Release
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os:
- macOS-latest
runner:
- - macOS-latest
fail-fast: false
steps:
- uses: actions/checkout@v1
with:
clean: false
- name: Download artifacts
uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -468,17 +472,19 @@ jobs:
- version_assertions
- lint
- test
- build
- package
release_to_cdn:
name: CDN Release
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os:
runner:
- ubuntu-18.04
fail-fast: false
steps:
- uses: actions/checkout@v1
with:
clean: false
- name: Download artifacts
uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -532,4 +538,4 @@ jobs:
- version_assertions
- lint
- test
- build
- package
Loading

0 comments on commit 535976e

Please sign in to comment.