Skip to content

Commit

Permalink
CI Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoliykmetyuk committed Apr 7, 2020
1 parent 33a6f9e commit c7cf07b
Showing 1 changed file with 10 additions and 314 deletions.
324 changes: 10 additions & 314 deletions .github/workflows/ci.yaml
Expand Up @@ -3,332 +3,28 @@ name: Dotty CI
on:
push:
pull_request:
schedule:
- cron: '0 3 * * *' # Every day at 3 AM

env:
DOTTY_CI_RUN: true

jobs:
test:
runs-on: self-hosted
container: akmetiuk/dotty:2020-02-12

steps:
- name: Cleanup
run: |
TARGETS="$(pwd) /__w/_temp /github/home"
for folder in $TARGETS; do
echo "Cleaning $folder"
cd $folder
rm -rf ..?* .[!.]* *
done
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/cache@v1.1.2
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/cache@v1.1.2
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/cache@v1.1.2
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Test
run: |
./project/scripts/sbt ";compile ;test"
./project/scripts/cmdTests
test_bootstrapped:
runs-on: self-hosted
container: akmetiuk/dotty:2020-02-12

steps:
- name: Cleanup
run: |
TARGETS="$(pwd) /__w/_temp /github/home"
for folder in $TARGETS; do
echo "Cleaning $folder"
cd $folder
rm -rf ..?* .[!.]* *
done
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/cache@v1.1.2
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/cache@v1.1.2
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/cache@v1.1.2
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Test
run: |
./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test ;configureIDE"
./project/scripts/bootstrapCmdTests
community_build:
runs-on: self-hosted
container: akmetiuk/dotty:2020-02-12
good:
runs-on: ubuntu-latest

steps:
- name: Cleanup
run: |
TARGETS="$(pwd) /__w/_temp /github/home"
for folder in $TARGETS; do
echo "Cleaning $folder"
cd $folder
rm -rf ..?* .[!.]* *
done
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/cache@v1.1.2
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/cache@v1.1.2
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/cache@v1.1.2
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Test
run: |
git submodule sync
git submodule update --init --recursive --jobs 7
./project/scripts/sbt community-build/test
echo "Hello"
echo "github.event_name = ${{ github.event_name }}"
echo "github.event.ref = ${{ github.event.ref }}"
echo "startsWith(github.event.ref, 'refs/tags/') = ${{ startsWith(github.event.ref, 'refs/tags/') }}"
echo "If-condition = ${{ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) || github.event_name == 'schedule' }}"
test_sbt:
runs-on: self-hosted
container: akmetiuk/dotty:2020-02-12
bad:
runs-on: ubuntu-latest
if: (
github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags/')
) ||
github.event_name == 'schedule'

steps:
- name: Cleanup
run: |
TARGETS="$(pwd) /__w/_temp /github/home"
for folder in $TARGETS; do
echo "Cleaning $folder"
cd $folder
rm -rf ..?* .[!.]* *
done
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/cache@v1.1.2
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/cache@v1.1.2
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/cache@v1.1.2
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Test
run: ./project/scripts/sbt sbt-dotty/scripted

test_java11:
runs-on: self-hosted
container: akmetiuk/dotty:2020-02-12
if: (
github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags/')
) ||
github.event_name == 'schedule'

steps:
- name: Cleanup
run: |
TARGETS="$(pwd) /__w/_temp /github/home"
for folder in $TARGETS; do
echo "Cleaning $folder"
cd $folder
rm -rf ..?* .[!.]* *
done
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/cache@v1.1.2
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/cache@v1.1.2
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/cache@v1.1.2
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Test
run: |
export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH"
./project/scripts/sbt ";compile ;test"
publish_nightly:
runs-on: self-hosted
container: akmetiuk/dotty:2020-02-12
needs: [test, test_bootstrapped, community_build, test_sbt, test_java11]
if: github.event_name == 'schedule'
env:
NIGHTLYBUILD: yes
PGP_PW: ${{ secrets.PGP_PW }} # PGP passphrase
PGP_SECRET: ${{ secrets.PGP_SECRET }} # Export your private and public PGP key to an *.asc file, take the file's contents as a string
SONATYPE_PW: ${{ secrets.SONATYPE_PW }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}

steps:
- name: Cleanup
run: |
TARGETS="$(pwd) /__w/_temp /github/home"
for folder in $TARGETS; do
echo "Cleaning $folder"
cd $folder
rm -rf ..?* .[!.]* *
done
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/cache@v1.1.2
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/cache@v1.1.2
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/cache@v1.1.2
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Publish Nightly
run: |
./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
nightly_documentation:
runs-on: self-hosted
container: akmetiuk/dotty:2020-02-12
needs: [publish_nightly]
if: github.event_name == 'schedule'
env:
NIGHTLYBUILD: yes
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} # If you need to change this:
# Generate one at https://github.com/settings/tokens
# Make sure you have the write permissions to the repo: https://github.com/lampepfl/dotty-website

steps:
- name: Cleanup
run: |
TARGETS="$(pwd) /__w/_temp /github/home"
for folder in $TARGETS; do
echo "Cleaning $folder"
cd $folder
rm -rf ..?* .[!.]* *
done
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/cache@v1.1.2
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/cache@v1.1.2
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/cache@v1.1.2
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Nightly Documentation
run: |
./project/scripts/genDocs -doc-snapshot
run: echo "Hello"

0 comments on commit c7cf07b

Please sign in to comment.