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

Enable selective test execution in Mill's own CI #4118

Merged
merged 60 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
708c628
wip
lihaoyi Dec 12, 2024
34d91fb
wip
lihaoyi Dec 12, 2024
d4af3cc
wip
lihaoyi Dec 12, 2024
2e6e2ea
wip
lihaoyi Dec 12, 2024
1c09baf
wip
lihaoyi Dec 12, 2024
c5fdc84
wip
lihaoyi Dec 12, 2024
25a82df
name run -> prepare
lihaoyi Dec 12, 2024
28a65da
test changes
lihaoyi Dec 12, 2024
fcf1975
wip
lihaoyi Dec 12, 2024
7bc70d6
wip
lihaoyi Dec 12, 2024
671fb7b
wip
lihaoyi Dec 12, 2024
e155ebb
wip
lihaoyi Dec 12, 2024
fe7f317
wip
lihaoyi Dec 12, 2024
73f1c8b
wip
lihaoyi Dec 12, 2024
afa6db5
wip
lihaoyi Dec 12, 2024
2cd6c9c
wip
lihaoyi Dec 12, 2024
8c6384e
wip
lihaoyi Dec 12, 2024
f9a0a26
wip
lihaoyi Dec 12, 2024
3ff725c
wip
lihaoyi Dec 12, 2024
0ef2304
wip
lihaoyi Dec 12, 2024
3762c50
wip
lihaoyi Dec 12, 2024
2776604
wip
lihaoyi Dec 12, 2024
2fb7ae2
.
lihaoyi Dec 12, 2024
b987276
.
lihaoyi Dec 12, 2024
33a1e92
.
lihaoyi Dec 12, 2024
6f0c85b
.
lihaoyi Dec 12, 2024
d6cb145
Merge branch 'main' into selective-ci
lihaoyi Dec 13, 2024
b9834b5
.
lihaoyi Dec 13, 2024
2efbce6
add os param
lihaoyi Dec 13, 2024
bd2e87c
find for debugging
lihaoyi Dec 13, 2024
c6ea984
.
lihaoyi Dec 13, 2024
e1301cb
.
lihaoyi Dec 13, 2024
d7fbe6e
.
lihaoyi Dec 13, 2024
b0fa628
.
lihaoyi Dec 13, 2024
484e9a4
.
lihaoyi Dec 13, 2024
f12a75a
.
lihaoyi Dec 13, 2024
dc99929
.
lihaoyi Dec 13, 2024
0b9cbd9
.
lihaoyi Dec 13, 2024
d0f59f3
only run selective execution on PRs
lihaoyi Dec 13, 2024
0f0d167
speedup
lihaoyi Dec 13, 2024
b220d95
speedup
lihaoyi Dec 13, 2024
d0c6d68
speedup
lihaoyi Dec 13, 2024
2432268
speedup
lihaoyi Dec 13, 2024
a513a89
stable-version-env
lihaoyi Dec 13, 2024
e7e3ed6
cleanup
lihaoyi Dec 13, 2024
c243ee5
cleanup
lihaoyi Dec 13, 2024
4feba3f
cleanup
lihaoyi Dec 13, 2024
7344d5d
cleanup
lihaoyi Dec 13, 2024
2608aa5
merge
lihaoyi Dec 13, 2024
476469a
simplify
lihaoyi Dec 13, 2024
8f1df11
simplify
lihaoyi Dec 13, 2024
6a157c9
merge
lihaoyi Dec 13, 2024
5450c20
windows
lihaoyi Dec 13, 2024
0d1dd9f
try without chmod
lihaoyi Dec 13, 2024
c39901c
.
lihaoyi Dec 13, 2024
257b3e6
.
lihaoyi Dec 13, 2024
a964494
.
lihaoyi Dec 13, 2024
67a0a60
.
lihaoyi Dec 13, 2024
bba286d
.
lihaoyi Dec 13, 2024
9677a7a
.
lihaoyi Dec 13, 2024
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
2 changes: 1 addition & 1 deletion .config/mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.12.3-58-4a0046
0.12.3-58-4a0046
30 changes: 30 additions & 0 deletions .github/actions/post-build-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# action.yml
inputs:
java-version:
required: true
type: string

timeout-minutes:
default: 60
type: number

os:
type: string

runs:
using: "composite"
steps:
- uses: actions/setup-java@v4
with:
java-version: ${{ inputs.java-version }}
distribution: temurin

- uses: actions/checkout@v4

# Need to fix cached artifact file permissions because github actions screws it up
# https://github.com/actions/upload-artifact/issues/38
- name: chmod executable
run: "chmod -R +x ."
shell: bash

- uses: coursier/cache-action@v6
36 changes: 36 additions & 0 deletions .github/workflows/post-build-raw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: post-build-raw
on:
workflow_call:
inputs:
buildcmd:
default: ''
type: string
java-version:
required: true
type: string
os:
default: 'ubuntu-latest'
type: string
timeout-minutes:
default: 60
type: number

jobs:
run:
runs-on: ${{ inputs.os }}
continue-on-error: false
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/post-build-setup
with:
java-version: ${{ inputs.java-version }}
os: ${{ inputs.os }}

- uses: actions/download-artifact@v4
with:
path: .
name: ${{ inputs.os }}-artifact

- run: ${{ inputs.buildcmd }}
69 changes: 69 additions & 0 deletions .github/workflows/post-build-selective.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: post-build-selective
on:
workflow_call:
inputs:
millargs:
default: ''
type: string
java-version:
required: true
type: string
os:
default: 'ubuntu-latest'
type: string
timeout-minutes:
default: 60
type: number
install-android-sdk:
default: false
type: boolean

jobs:
run:
runs-on: ${{ inputs.os }}
continue-on-error: false
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/post-build-setup
with:
java-version: ${{ inputs.java-version }}
os: ${{ inputs.os }}

- uses: actions/download-artifact@v4
with:
path: .
name: ${{ inputs.os }}-artifact

- run: chmod -R 777 . # normalize permissions before and after upload/download-artifact

- uses: actions/download-artifact@v4
with:
path: out/mill-selective-execution
name: ${{ inputs.os }}-selective-execution-artifact

- run: mv out/mill-selective-execution/mill-selective-execution.json out/mill-selective-execution.json

- uses: actions/setup-node@v4
with:
node-version: '22'

- uses: android-actions/setup-android@v3
if: ${{ inputs.install-android-sdk }}
with:
log-accepted-android-sdk-licenses: false

- run: ./mill -i -k selective.resolve ${{ inputs.millargs }}
if: github.event_name == 'pull_request'

- run: ./mill -i -k selective.run ${{ inputs.millargs }}
if: github.event_name == 'pull_request'

- run: ./mill -i -k ${{ inputs.millargs }}
if: github.event_name != 'pull_request'

- run: 'taskkill -f -im java* && rm -rf out/mill-server/*'
if: startsWith(inputs.os, 'windows')
shell: bash
continue-on-error: true
53 changes: 53 additions & 0 deletions .github/workflows/pre-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
on:
workflow_call:
inputs:
compileargs:
default: '__.compile'
type: string
prepareargs:
default: '__.test'
type: string
java-version:
default: '11'
type: string
os:
type: string
timeout-minutes:
default: 60
type: number

jobs:
run:
runs-on: ${{ inputs.os }}
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- uses: actions/setup-java@v4
with:
java-version: ${{ inputs.java-version }}
distribution: temurin

- uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- run: chmod -R 777 . # normalize permissions before and after upload/download-artifact

- run: ./mill -i -k selective.prepare ${{ inputs.prepareargs }}

- uses: actions/[email protected]
with:
path: out/mill-selective-execution.json
name: ${{ inputs.os }}-selective-execution-artifact
include-hidden-files: true

- uses: actions/checkout@v4

- uses: coursier/cache-action@v6

- run: ./mill -i -k ${{ inputs.compileargs }}

- uses: actions/[email protected]
with:
path: .
name: ${{ inputs.os }}-artifact
include-hidden-files: true
40 changes: 0 additions & 40 deletions .github/workflows/publish-bridges.yml

This file was deleted.

97 changes: 0 additions & 97 deletions .github/workflows/run-mill-action.yml

This file was deleted.

Loading
Loading