Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 298b6ec

Browse files
committed
Julia: add windows-cpu build
- Julia v0.7 - Julia v1.0
1 parent e8a2b8b commit 298b6ec

File tree

7 files changed

+145
-63
lines changed

7 files changed

+145
-63
lines changed

ci/jenkins/Jenkins_steps.groovy

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,34 @@ def test_windows_python3_cpu() {
11691169
}]
11701170
}
11711171

1172+
def test_windows_julia07_cpu() {
1173+
return ['Julia 0.7: CPU Win': {
1174+
node(NODE_WINDOWS_CPU) {
1175+
ws('workspace/ut-julia07-cpu') {
1176+
timeout(time: max_time, unit: 'MINUTES') {
1177+
utils.init_git_win()
1178+
unstash 'windows_package_cpu'
1179+
powershell 'ci/windows/test_jl07_cpu.ps1'
1180+
}
1181+
}
1182+
}
1183+
}]
1184+
}
1185+
1186+
def test_windows_julia10_cpu() {
1187+
return ['Julia 1.0: CPU Win': {
1188+
node(NODE_WINDOWS_CPU) {
1189+
ws('workspace/ut-julia10-cpu') {
1190+
timeout(time: max_time, unit: 'MINUTES') {
1191+
utils.init_git_win()
1192+
unstash 'windows_package_cpu'
1193+
powershell 'ci/windows/test_jl10_cpu.ps1'
1194+
}
1195+
}
1196+
}
1197+
}]
1198+
}
1199+
11721200
def test_qemu_armv7_cpu() {
11731201
return ['ARMv7 QEMU': {
11741202
node(NODE_LINUX_CPU) {

ci/jenkins/Jenkinsfile_windows_cpu

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ utils.main_wrapper(
3535
core_logic: {
3636
utils.parallel_stage('Build', [
3737
custom_steps.compile_windows_cpu()
38-
])
38+
])
3939

4040
utils.parallel_stage('Tests', [
4141
custom_steps.test_windows_python2_cpu(),
42-
custom_steps.test_windows_python3_cpu()
43-
])
42+
custom_steps.test_windows_python3_cpu(),
43+
custom_steps.test_windows_julia07_cpu(),
44+
custom_steps.test_windows_julia10_cpu()
45+
])
4446
}
4547
,
4648
failure_handler: {

ci/windows/test_jl07_cpu.ps1

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
7z x -y windows_package.7z
19+
20+
# set default output encoding to utf8
21+
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
22+
23+
$env:MXNET_HOME = [System.IO.Path]::GetFullPath('.\windows_package')
24+
$env:JULIA_URL = "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7.0-win64.exe"
25+
$env:JULIA_DEPOT_PATH = [System.IO.Path]::GetFullPath('.\julia-depot')
26+
27+
$JULIA_DIR = [System.IO.Path]::GetFullPath('.\julia07')
28+
$JULIA = "$JULIA_DIR\bin\julia"
29+
30+
# Download most recent Julia Windows binary
31+
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
32+
(New-Object System.Net.WebClient).DownloadFile($env:JULIA_URL, "julia-binary.exe")
33+
if (! $?) { Throw ("Error on downloading Julia Windows binary") }
34+
35+
# Run installer silently, output to C:\julia07\julia
36+
Start-Process -Wait "julia-binary.exe" -ArgumentList "/S /D=$JULIA_DIR"
37+
if (! $?) { Throw ("Error on installing Julia") }
38+
39+
& $JULIA -e "using InteractiveUtils; versioninfo()"
40+
41+
# workaround a bug of Julia 0.7
42+
# use PackageSpec(name = "MXNet", path = "...") if we drop the 0.7 support
43+
Copy-Item -Path .\julia -Recurse -Destination "$env:JULIA_DEPOT_PATH\dev\MXNet"
44+
45+
$src='
46+
using Pkg
47+
Pkg.develop("MXNet")
48+
Pkg.build("MXNet")
49+
Pkg.test("MXNet")
50+
'
51+
52+
$src > .\ci-build.jl
53+
& $JULIA .\ci-build.jl
54+
if (! $?) { Throw ("Error") }

ci/windows/test_jl10_cpu.ps1

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
7z x -y windows_package.7z
19+
20+
# set default output encoding to utf8
21+
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
22+
23+
$env:MXNET_HOME = [System.IO.Path]::GetFullPath('.\windows_package')
24+
$env:JULIA_URL = "https://julialang-s3.julialang.org/bin/winnt/x64/1.0/julia-1.0.3-win64.exe"
25+
$env:JULIA_DEPOT_PATH = [System.IO.Path]::GetFullPath('.\julia-depot')
26+
27+
$JULIA_DIR = [System.IO.Path]::GetFullPath('.\julia10')
28+
$JULIA = "$JULIA_DIR\bin\julia"
29+
30+
# Download most recent Julia Windows binary
31+
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
32+
(New-Object System.Net.WebClient).DownloadFile($env:JULIA_URL, "julia-binary.exe")
33+
if (! $?) { Throw ("Error on downloading Julia Windows binary") }
34+
35+
# Run installer silently, output to C:\julia10\julia
36+
Start-Process -Wait "julia-binary.exe" -ArgumentList "/S /D=$JULIA_DIR"
37+
if (! $?) { Throw ("Error on installing Julia") }
38+
39+
& $JULIA -e "using InteractiveUtils; versioninfo()"
40+
41+
# workaround a bug of Julia 0.7
42+
# use PackageSpec(name = "MXNet", path = "...") if we drop the 0.7 support
43+
Copy-Item -Path .\julia -Recurse -Destination "$env:JULIA_DEPOT_PATH\dev\MXNet"
44+
45+
$src='
46+
using Pkg
47+
Pkg.develop("MXNet")
48+
Pkg.build("MXNet")
49+
Pkg.test("MXNet")
50+
'
51+
52+
$src > .\ci-build.jl
53+
& $JULIA .\ci-build.jl
54+
if (! $?) { Throw ("Error") }

julia/appveyor.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

julia/deps/build.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ if HAS_CUDA
8686
if HAS_CUDNN
8787
@info("Found a CuDNN installation.")
8888
end
89-
@info("CUDA_HOME -> $(get(ENV, "CUDA_HOME", nothing))")
89+
@info("CUDA_HOME -> $(get(ENV, "CUDA_HOME", "nothing"))")
9090
else
9191
@info("Did not find a CUDA installation, using CPU-only version of MXNet.")
9292
end

julia/src/util.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ function get_mnist_ubyte()
3535
filenames = Dict((x[1] => joinpath(mnist_dir, x[2]) for x pairs(filenames)))
3636
if !all(isfile, values(filenames))
3737
cd(mnist_dir) do
38-
mnist_dir = download("http://data.mxnet.io/mxnet/data/mnist.zip", "mnist.zip")
38+
data = download("http://data.mxnet.io/mxnet/data/mnist.zip", "mnist.zip")
3939
try
40-
run(`unzip -u $mnist_dir`)
40+
run(`unzip -u $data`)
4141
catch
4242
try
43-
run(pipe(`7z x $mnist_dir`,stdout = devnull))
43+
run(pipeline(`7z x $data`,stdout = devnull))
4444
catch
4545
error("Extraction Failed:No extraction program found in path")
4646
end

0 commit comments

Comments
 (0)