@@ -77,38 +77,66 @@ jobs:
77
77
# in the list should be the one that's most worth looking into
78
78
build-linux :
79
79
if : (github.event.action == 'ready_for_review') || (github.event.pull_request.draft == false)
80
- uses : ./.github/workflows/pre-build.yml
81
- with :
82
- os : ubuntu-latest
83
- shell : bash
84
-
85
- linux :
86
- needs : build-linux
87
80
runs-on : ubuntu-latest
88
81
steps :
89
- - uses : coursier/cache-action@v6
82
+ # For normal PR jobs, just checkout the base_ref the PR is against
83
+ - uses : actions/checkout@v4
84
+ with : { fetch-depth: 1 }
90
85
91
- - uses : actions/download-artifact@v4
86
+ # For normal PR jobs, just checkout the base_ref the PR is against
87
+ - uses : actions/checkout@v4
92
88
with :
93
- path : .
94
- name : ubuntu-latest-artifact
89
+ ref : ${{ github.base_ref }}
90
+ if : ${{ !(github.event_name == 'push' && github.repository != 'com-lihaoyi/mill') }}
91
+
92
+ - run : |
93
+ git fetch https://github.com/com-lihaoyi/mill main
94
+ MERGE_BASE=$(git merge-base FETCH_HEAD HEAD)
95
+ # pretty-print the path between the FETCH_HEAD (main), HEAD, and the merge-base
96
+ git log --graph --pretty=format:"%h %d %ar %s %n" --ancestry-path $MERGE_BASE^1..HEAD --ancestry-path $MERGE_BASE^1..FETCH_HEAD
97
+
98
+ git checkout $MERGE_BASE
99
+ shell: bash
100
+ if: ${{ github.event_name == 'push' && github.repository != 'com-lihaoyi/mill' }}
101
+
102
+ - run : echo temurin:17 > .mill-jvm-version
95
103
96
- - uses : ./.github/actions/post-build-setup
104
+ - run : chmod -R 777 . # normalize permissions before and after upload/download-artifact
105
+
106
+ - run : mkdir out && touch out/mill-selective-execution.json
107
+
108
+ - run : cat .mill-jvm-version
109
+
110
+ - run : ./mill -i --debug -k selective.prepare
111
+
112
+
97
113
with :
98
- java-version : 17
99
- os : ubuntu-latest
114
+ path : out/mill-selective-execution.json
115
+ name : ubuntu-latest-selective-execution-artifact
116
+ include-hidden-files : true
100
117
101
118
- 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"]'
102
119
- 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"]'
103
120
- 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"]'
104
121
- 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"]'
105
122
106
- - run : ./mill -i --debug -k selective.resolve 'example.javalib.basic[1-simple].native.server.test'
107
- - run : ./mill -i --debug -k selective.resolveTree 'example.javalib.basic[1-simple].native.server.test'
108
- - run : ./mill -i --debug -k selective.resolveChanged 'example.javalib.basic[1-simple].native.server.test'
123
+ - uses : actions/checkout@v4
124
+
125
+ - uses : actions/download-artifact@v4
126
+ with :
127
+ path : out/mill-selective-execution
128
+ name : ubuntu-latest-selective-execution-artifact
129
+
130
+ - run : mv out/mill-selective-execution/mill-selective-execution.json out/mill-selective-execution.json
131
+ shell : bash
132
+
133
+ - run : ./mill -i --debug -k __.compile
109
134
110
135
- 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"]'
111
136
- 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"]'
112
137
- 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"]'
113
138
- 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"]'
114
139
140
+ - run : ./mill -i --debug -k selective.resolve 'example.javalib.basic[1-simple].native.server.test'
141
+ - run : ./mill -i --debug -k selective.resolveTree 'example.javalib.basic[1-simple].native.server.test'
142
+ - run : ./mill -i --debug -k selective.resolveChanged 'example.javalib.basic[1-simple].native.server.test'
0 commit comments