Improve the CI configuration (#1122)

This commit is contained in:
Ara Adkins 2020-09-07 12:24:34 +01:00 committed by GitHub
parent e92b9d0fc0
commit 259302c229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 95 additions and 34 deletions

View File

@ -217,6 +217,7 @@ branches:
- "Build Engine (macOS-latest)"
- "Build Engine (ubuntu-latest)"
- "Build Engine (windows-latest)"
- "Docs Check"
- "Rust Check"
- "Rust Lint"
- "Rust Test Native (macOS-latest)"
@ -241,6 +242,7 @@ branches:
- "Test Engine (macOS-latest)"
- "Test Engine (ubuntu-latest)"
- "Test Engine (windows-latest)"
- "Docs Check"
- "Build Engine"
- "Rust Check"
- "Rust Lint"

View File

@ -1,38 +1,29 @@
name: Publish Developer Docs
name: Docs CI
on:
push:
branches:
- main
paths:
- "docs/**"
branches: [main, "release/*"]
pull_request:
branches: ["*"]
env:
nodeVersion: 12.18.0
jobs:
checkout:
check:
name: Docs Check
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Checkout Library Sources
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v1
with:
repository: "enso-org/enso-org.github.io"
ref: "sources"
token: ${{ secrets.ENSO_PAT }}
- name: set identity email
run: git config --global user.email "actions@github.com"
- name: set identity name
run: git config --global user.name "GitHub Actions"
- name: Checkout submodules
run: git submodule update --init
- name: Update submodules
id: status
run: |
git submodule update --init
git submodule update --remote --merge
if [ -n "$(git status --porcelain)" ]; then
echo "::set-output name=has_changes::1"
fi
- name: Push changes
run: |
git add .
git commit -m "Update submodules"
git push origin sources
if: steps.status.outputs.has_changes == '1'
node-version: ${{ env.nodeVersion }}
- name: Install Prettier
run: npm install
- name: Check Docs
run: npx prettier --check .

38
.github/workflows/publish-docs.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Publish Developer Docs
on:
push:
branches:
- main
paths:
- "docs/**"
jobs:
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: "enso-org/enso-org.github.io"
ref: "sources"
token: ${{ secrets.ENSO_PAT }}
- name: set identity email
run: git config --global user.email "actions@github.com"
- name: set identity name
run: git config --global user.name "GitHub Actions"
- name: Checkout submodules
run: git submodule update --init
- name: Update submodules
id: status
run: |
git submodule update --init
git submodule update --remote --merge
if [ -n "$(git status --porcelain)" ]; then
echo "::set-output name=has_changes::1"
fi
- name: Push changes
run: |
git add .
git commit -m "Update submodules"
git push origin sources
if: steps.status.outputs.has_changes == '1'

View File

@ -30,13 +30,23 @@ jobs:
uses: actions/checkout@v2
with:
path: repo
- name: Enable Developer Command Prompt (Windows)
uses: ilammy/msvc-dev-cmd@v1.3.0
- name: Disable TCP/UDP Offloading (Linux)
if: runner.os == 'Linux'
shell: bash
run: sudo ethtool -K eth0 tx off rx off
- name: Disable TCP/UDP Offloading (Windows)
if: runner.os == 'Windows'
shell: powershell
run: >
Disable-NetAdapterChecksumOffload -Name * -TcpIPv4 -UdpIPv4 -TcpIPv6
-UdpIPv6
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rustToolchain }}
override: true
- name: Enable Developer Command Prompt (Windows)
uses: ilammy/msvc-dev-cmd@v1.3.0
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:

View File

@ -41,6 +41,16 @@ jobs:
- uses: actions/checkout@v2
- name: Enable Developer Command Prompt (Windows)
uses: ilammy/msvc-dev-cmd@v1.3.0
- name: Disable TCP/UDP Offloading (Linux)
if: runner.os == 'Linux'
shell: bash
run: sudo ethtool -K eth0 tx off rx off
- name: Disable TCP/UDP Offloading (Windows)
if: runner.os == 'Windows'
shell: powershell
run: >
Disable-NetAdapterChecksumOffload -Name * -TcpIPv4 -UdpIPv4 -TcpIPv6
-UdpIPv6
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
@ -152,13 +162,23 @@ jobs:
- name: Checkout (Branch)
uses: actions/checkout@v2
if: github.event_name != 'pull_request'
- name: Enable Developer Command Prompt (Windows)
uses: ilammy/msvc-dev-cmd@v1.3.0
- name: Disable TCP/UDP Offloading (Linux)
if: runner.os == 'Linux'
shell: bash
run: sudo ethtool -K eth0 tx off rx off
- name: Disable TCP/UDP Offloading (Windows)
if: runner.os == 'Windows'
shell: powershell
run: >
Disable-NetAdapterChecksumOffload -Name * -TcpIPv4 -UdpIPv4 -TcpIPv6
-UdpIPv6
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rustToolchain }}
override: true
- name: Enable Developer Command Prompt (Windows)
uses: ilammy/msvc-dev-cmd@v1.3.0
- name: Setup conda
uses: s-weigand/setup-conda@v1
with: