1515 build-scala :
1616 runs-on : ubuntu-20.04
1717
18+ strategy :
19+ matrix :
20+ spark_version :
21+ - " 3.2.4"
22+ - " 3.3.2"
23+ - " 3.4.0"
24+
1825 steps :
1926 - name : Checkout Repository
2027 uses : actions/checkout@v3
@@ -25,22 +32,30 @@ jobs:
2532 uses : ./.github/actions/init-scala-env
2633
2734 - name : Compile Scala Project
35+ env :
36+ SPARK_VERSION : ${{ matrix.spark_version }}
2837 run : make compile-scala
2938
3039 - name : Test Scala Project
3140 # python/* branches are not supposed to change scala code, trust them
3241 if : ${{ !startsWith(github.event.inputs.from_branch, 'python/') }}
33- run : make test-scala
42+ env :
43+ SPARK_VERSION : ${{ matrix.spark_version }}
44+ run :
45+ ulimit -c unlimited
46+ make test-scala
3447
3548 - name : Build Spark Assembly
49+ env :
50+ SPARK_VERSION : ${{ matrix.spark_version }}
3651 shell : bash
3752 run : make build-scala
3853
3954 - name : Cache Spark Assembly
4055 uses : actions/cache@v3
4156 with :
4257 path : ./dist/*
43- key : dist-${{ github.sha }}
58+ key : dist-${{ matrix.spark_version }}-${{ github.sha }}
4459
4560 build-python :
4661 # scala/* branches are not supposed to change python code, trust them
5065
5166 strategy :
5267 matrix :
53- python : [ "3.8" ]
68+ python :
69+ - " 3.8"
70+ - " 3.9"
71+ spark_version :
72+ - " 3.2.4"
73+ - " 3.3.2"
74+ - " 3.4.0"
5475
5576 steps :
5677 - name : Checkout Repository
6182 - uses : ./.github/actions/init-python-env
6283 with :
6384 python_version : ${{ matrix.python }}
85+ spark_version : ${{ matrix.spark_version }}
6486
6587 - name : Static checks
6688 shell : bash
@@ -69,18 +91,27 @@ jobs:
6991 - uses : actions/cache@v3
7092 with :
7193 path : ./dist/*
72- key : dist-${{ github.sha }}
94+ key : dist-${{ matrix.spark_version }}-${{ github.sha }}
7395
7496 - name : Run tests
97+ env :
98+ SPARK_VERSION : ${{ matrix.spark_version }}
7599 shell : bash
76100 run : make test-python-quick
77101
78- publish :
79- name : Publish Artifacts
102+ publish-scala :
103+ name : Publish Scala Artifacts
80104 needs : [ build-scala, build-python ]
81105 runs-on : ubuntu-20.04
82106 if : (github.event_name != 'pull_request') && startsWith(github.ref, 'refs/tags/v')
83107
108+ strategy :
109+ matrix :
110+ spark_version :
111+ - " 3.2.4"
112+ - " 3.3.2"
113+ - " 3.4.0"
114+
84115 steps :
85116 - name : Checkout Repository
86117 uses : actions/checkout@v3
@@ -94,17 +125,58 @@ jobs:
94125 shell : bash
95126 env :
96127 GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
128+ SPARK_VERSION : ${{ matrix.spark_version }}
97129 run : make publish-scala
98130
131+ - name : Build Spark Assembly
132+ env :
133+ SPARK_VERSION : ${{ matrix.spark_version }}
134+ shell : bash
135+ run : make build-scala
136+
137+ - name : Cache Spark Assembly
138+ uses : actions/cache@v3
139+ with :
140+ path : ./dist/*
141+ key : dist-${{ matrix.spark_version }}-${{ github.ref }}
142+
143+
144+ publish-python :
145+ name : Publish Scala Artifacts
146+ needs : [ publish-scala ]
147+ runs-on : ubuntu-20.04
148+ if : (github.event_name != 'pull_request') && startsWith(github.ref, 'refs/tags/v')
149+
150+ strategy :
151+ matrix :
152+ python :
153+ - " 3.8"
154+ - " 3.9"
155+ spark_version :
156+ - " 3.2.4"
157+ - " 3.3.2"
158+ - " 3.4.0"
159+
160+ steps :
161+ - name : Checkout Repository
162+ uses : actions/checkout@v3
163+ with :
164+ fetch-depth : 0
165+
99166 - uses : ./.github/actions/init-python-env
100167 with :
101- python_version : " 3.8"
168+ python_version : ${{ matrix.python }}
169+ spark_version : ${{ matrix.spark_version }}
170+
171+ - uses : actions/cache@v3
172+ with :
173+ path : ./dist/*
174+ key : dist-${{ matrix.spark_version }}-${{ github.ref }}
102175
103176 - name : Build Python whl
104177 shell : bash
105178 run : make build-python
106179
107-
108180# TODO: Where does this go, do we need it?
109181# - name: upload artefacts
110182# uses: ./.github/actions/upload_artefacts
0 commit comments