@@ -26,22 +26,52 @@ jobs:
26
26
- uses : actions/checkout@v4
27
27
with : { fetch-depth: 1 }
28
28
29
- - uses : ./.github/actions/pre-build-setup
29
+ # For normal PR jobs, just checkout the base_ref the PR is against
30
+ - uses : actions/checkout@v4
30
31
with :
31
- os : ${{ inputs.os }}
32
- java-version : ${{ inputs.java-version }}
33
- shell : ${{ inputs.shell }}
32
+ ref : ${{ github.base_ref }}
33
+ if : ${{ !(github.event_name == 'push' && github.repository != 'com-lihaoyi/mill') }}
34
34
35
- - run : ./mill -i --debug -k ${{ inputs.compileargs }}
35
+ # For fork push jobs, first checkout the version being pushed, then look for the
36
+ # merge-base where the current version forks off from the upstream main branch
37
+ - uses : actions/checkout@v4
38
+ with : { fetch-depth: 0 }
39
+
40
+ - run : |
41
+ git fetch https://github.com/com-lihaoyi/mill main
42
+ MERGE_BASE=$(git merge-base FETCH_HEAD HEAD)
43
+ # pretty-print the path between the FETCH_HEAD (main), HEAD, and the merge-base
44
+ git log --graph --pretty=format:"%h %d %ar %s %n" --ancestry-path $MERGE_BASE^1..HEAD --ancestry-path $MERGE_BASE^1..FETCH_HEAD
45
+
46
+ git checkout $MERGE_BASE
47
+ shell: bash
48
+
49
+ - run : echo temurin:${{ inputs.java-version }} > .mill-jvm-version
50
+
51
+ - run : chmod -R 777 . # normalize permissions before and after upload/download-artifact
52
+
53
+ - run : mkdir out && touch out/mill-selective-execution.json
54
+
55
+ - run : cat .mill-jvm-version
56
+
57
+ - run : ./mill -i --debug -k selective.prepare ${{ inputs.prepareargs }}
58
+ if : ${{ (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'run-all-tests')) || github.repository != 'com-lihaoyi/mill' }}
36
59
37
60
38
61
- run : cat out/mill-build/methodCodeHashSignatures.dest/current/4-methodCodeHashes.json | jq '.["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
39
62
- run : cat out/mill-build/methodCodeHashSignatures.dest/current/7-transitiveCallGraphHashes.json | jq '.["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
40
63
- run : cat out/mill-build/methodCodeHashSignatures.json | jq '.["value"]["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
41
64
- run : cat out/mill-selective-execution.json | jq '.["methodCodeHashSignatures"]["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
42
65
43
-
44
- with :
45
- path : .
46
- name : ${{ inputs.os }}-artifact
47
- include-hidden-files : true
66
+ - uses : actions/checkout@v4
67
+
68
+ - run : ./mill -i --debug -k ${{ inputs.compileargs }}
69
+
70
+ - run : cat out/mill-build/methodCodeHashSignatures.dest/current/4-methodCodeHashes.json | jq '.["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
71
+ - run : cat out/mill-build/methodCodeHashSignatures.dest/current/7-transitiveCallGraphHashes.json | jq '.["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
72
+ - run : cat out/mill-build/methodCodeHashSignatures.json | jq '.["value"]["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
73
+ - run : cat out/mill-selective-execution.json | jq '.["methodCodeHashSignatures"]["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
74
+
75
+ - run : ./mill -i --debug -k selective.resolve 'example.javalib.basic[1-simple].native.server.test'
76
+ - run : ./mill -i --debug -k selective.resolveTree 'example.javalib.basic[1-simple].native.server.test'
77
+ - run : ./mill -i --debug -k selective.resolveChanged 'example.javalib.basic[1-simple].native.server.test'
0 commit comments