Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shreyansh Paliwal
purr-data
Commits
12bd57bd
Commit
12bd57bd
authored
4 years ago
by
Jonathan Wilkes
Browse files
Options
Downloads
Plain Diff
Merge branch 'samthursfield/purr-data-sam/ci-cache-nwjs'
parents
e9d38d23
04e04e8c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+17
-0
17 additions, 0 deletions
.gitlab-ci.yml
l2ork_addons/nwjs_version_for_platform.sh
+71
-0
71 additions, 0 deletions
l2ork_addons/nwjs_version_for_platform.sh
l2ork_addons/tar_em_up.sh
+18
-57
18 additions, 57 deletions
l2ork_addons/tar_em_up.sh
with
106 additions
and
57 deletions
.gitlab-ci.yml
+
17
−
0
View file @
12bd57bd
# This file creates automated tests on GitLab CI for Purr Data.
# This file creates automated tests on GitLab CI for Purr Data.
# See https://docs.gitlab.com/ee/ci/yaml/README.html for details of the format.
# See https://docs.gitlab.com/ee/ci/yaml/README.html for details of the format.
cache
:
key
:
global-cache
# These are script snippets used in the jobs defined below.
# These are script snippets used in the jobs defined below.
.fetch_nwjs
:
&fetch_nwjs
-
nwjs_filename=$(l2ork_addons/nwjs_version_for_platform.sh)
-
if [ -e /cache/$nwjs_filename ]; then cp /cache/$nwjs_filename ./l2ork_addons ; fi
.debian_image_preparation
:
&debian_image_preparation
.debian_image_preparation
:
&debian_image_preparation
-
echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
-
echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
-
echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
-
echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
...
@@ -12,6 +19,7 @@
...
@@ -12,6 +19,7 @@
-
cd l2ork_addons
-
cd l2ork_addons
-
export V=0
-
export V=0
-
./tar_em_up.sh $BUILD_TYPE_FLAG
-
./tar_em_up.sh $BUILD_TYPE_FLAG
-
cp nwjs-* /cache/
-
cd ..
-
cd ..
-
echo -e "section_end:`date +%s`:build_all\r\e[0K"
-
echo -e "section_end:`date +%s`:build_all\r\e[0K"
...
@@ -46,6 +54,7 @@ debian_stretch_x86_64_deb:
...
@@ -46,6 +54,7 @@ debian_stretch_x86_64_deb:
BUILD_TYPE_FLAG
:
-B
BUILD_TYPE_FLAG
:
-B
before_script
:
before_script
:
-
*debian_image_preparation
-
*debian_image_preparation
-
*fetch_nwjs
script
:
script
:
-
*build_all
-
*build_all
-
*test_linux
-
*test_linux
...
@@ -64,6 +73,7 @@ ubuntu_16.04_x86_64_deb:
...
@@ -64,6 +73,7 @@ ubuntu_16.04_x86_64_deb:
BUILD_TYPE_FLAG
:
-B
BUILD_TYPE_FLAG
:
-B
before_script
:
before_script
:
-
*debian_image_preparation
-
*debian_image_preparation
-
*fetch_nwjs
script
:
script
:
-
*build_all
-
*build_all
-
*test_linux
-
*test_linux
...
@@ -80,6 +90,8 @@ osx_10.11_x86_64_dmg:
...
@@ -80,6 +90,8 @@ osx_10.11_x86_64_dmg:
-
dmg
-
dmg
variables
:
variables
:
BUILD_TYPE_FLAG
:
-X
BUILD_TYPE_FLAG
:
-X
before_script
:
-
*fetch_nwjs
script
:
script
:
-
echo `pwd`
-
echo `pwd`
-
*build_all
-
*build_all
...
@@ -97,6 +109,8 @@ osx_10.8_x86_64_dmg:
...
@@ -97,6 +109,8 @@ osx_10.8_x86_64_dmg:
-
dmg
-
dmg
variables
:
variables
:
BUILD_TYPE_FLAG
:
-X
BUILD_TYPE_FLAG
:
-X
before_script
:
-
*fetch_nwjs
script
:
script
:
-
echo `pwd`
-
echo `pwd`
-
*build_all
-
*build_all
...
@@ -113,6 +127,8 @@ windows_i386_innosetup:
...
@@ -113,6 +127,8 @@ windows_i386_innosetup:
-
i386
-
i386
variables
:
variables
:
BUILD_TYPE_FLAG
:
-Z
BUILD_TYPE_FLAG
:
-Z
before_script
:
-
*fetch_nwjs
script
:
script
:
-
echo `pwd`
-
echo `pwd`
-
*build_all
-
*build_all
...
@@ -132,6 +148,7 @@ raspbian_stretch_armv7l_deb:
...
@@ -132,6 +148,7 @@ raspbian_stretch_armv7l_deb:
BUILD_TYPE_FLAG
:
-r
BUILD_TYPE_FLAG
:
-r
before_script
:
before_script
:
-
*debian_image_preparation
-
*debian_image_preparation
-
*fetch_nwjs
script
:
script
:
-
echo `pwd`
-
echo `pwd`
-
*build_all
-
*build_all
...
...
This diff is collapsed.
Click to expand it.
l2ork_addons/nwjs_version_for_platform.sh
0 → 100755
+
71
−
0
View file @
12bd57bd
#!/bin/bash
# nwjs_version_for_platform.sh
#
# Determine the version of nw.js that Purr Data should use on a given platform.
#
# Variables "$os" and "$arch" can be set in the environment, or autodetected.
set
-e
if
[
-z
"
$os
"
]
;
then
os
=
`
uname
|
tr
'[:upper:]'
'[:lower:]'
`
if
[[
$os
==
*
"mingw32"
*
]]
;
then
os
=
win
elif
[[
$os
==
"darwin"
]]
;
then
os
=
osx
fi
fi
if
[
-z
"
$arch
"
]
;
then
if
[
`
getconf LONG_BIT
`
-eq
32
]
;
then
arch
=
"ia32"
else
arch
=
"x64"
fi
# for rpi
if
[
`
uname
-m
`
==
"armv7l"
]
;
then
arch
=
"armv7l"
fi
# for pinebook, probably also rpi 4
if
[
`
uname
-m
`
==
"aarch64"
]
;
then
arch
=
"armv7l"
fi
fi
# MSYS: Pick the right architecture depending on whether we're
# running in the 32 or 64 bit version of the MSYS shell.
if
[[
$os
==
"win"
]]
;
then
arch
=
"ia32"
elif
[[
$os
==
"win64"
]]
;
then
arch
=
"x64"
fi
if
[[
$os
==
"win"
||
$os
==
"win64"
||
$os
==
"osx"
]]
;
then
ext
=
"zip"
else
ext
=
"tar.gz"
fi
if
[[
$osx_version
==
"10.8"
]]
;
then
# We need the lts version to be able to run on legacy systems.
nwjs_version
=
"v0.14.7"
else
# temporary kluge for rpi-- only 0.15.1 is available atm
if
[
$arch
==
"armv7l"
]
;
then
nwjs_version
=
"v0.17.6"
else
nwjs_version
=
"v0.24.4"
fi
fi
nwjs
=
"nwjs-sdk"
if
[[
$os
==
"win64"
]]
;
then
nwjs_dirname
=
${
nwjs
}
-
${
nwjs_version
}
-win-
${
arch
}
else
nwjs_dirname
=
${
nwjs
}
-
${
nwjs_version
}
-
${
os
}
-
${
arch
}
fi
nwjs_filename
=
${
nwjs_dirname
}
.
${
ext
}
echo
$nwjs_filename
This diff is collapsed.
Click to expand it.
l2ork_addons/tar_em_up.sh
+
18
−
57
View file @
12bd57bd
...
@@ -105,6 +105,7 @@ do case $Option in
...
@@ -105,6 +105,7 @@ do case $Option in
esac
esac
done
done
script_dir
=
$(
dirname
$0
)
inst_dir
=
${
inst_dir
:-
/usr/local
}
inst_dir
=
${
inst_dir
:-
/usr/local
}
# configure a light build if requested
# configure a light build if requested
...
@@ -163,82 +164,42 @@ fi
...
@@ -163,82 +164,42 @@ fi
# Fetch the nw.js binary if we haven't already. We want to fetch it even
# Fetch the nw.js binary if we haven't already. We want to fetch it even
# for building with no libs, so we do it regardless of the options
# for building with no libs, so we do it regardless of the options
#echo nwjs-sdk-v0.16.0-`uname | tr '[:upper:]' '[:lower:]'`
if
[
!
-d
"../pd/nw/nw"
]
;
then
if
[
!
-d
"../pd/nw/nw"
]
;
then
if
[
`
getconf LONG_BIT
`
-eq
32
]
;
then
nwjs_filename
=
$(
$script_dir
/nwjs_version_for_platform.sh
)
arch
=
"ia32"
else
arch
=
"x64"
fi
# for rpi
if
[
`
uname
-m
`
==
"armv7l"
]
;
then
arch
=
"armv7l"
fi
# for pinebook, probably also rpi 4
if
[
`
uname
-m
`
==
"aarch64"
]
;
then
arch
=
"armv7l"
fi
# MSYS: Pick the right architecture depending on whether we're
if
[
-e
"./
$nwjs_filename
"
]
;
then
# running in the 32 or 64 bit version of the MSYS shell.
echo
"Found
$nwjs_filename
"
if
[[
$os
==
"win"
]]
;
then
arch
=
"ia32"
elif
[[
$os
==
"win64"
]]
;
then
arch
=
"x64"
fi
if
[[
$os
==
"win"
||
$os
==
"win64"
||
$os
==
"osx"
]]
;
then
ext
=
"zip"
else
else
ext
=
"tar.gz"
nwjs_version
=
$(
echo
$nwjs_filename
| egrep
-o
'v[^-]+'
)
fi
nwjs_url
=
https://git.purrdata.net/jwilkes/nwjs-binaries/raw/master
nwjs_url
=
${
nwjs_url
}
/
$nwjs_filename
if
[[
$osx_version
==
"10.8"
]]
;
then
# We need the lts version to be able to run on legacy systems.
nwjs_version
=
"v0.14.7"
else
# temporary kluge for rpi-- only 0.15.1 is available atm
if
[
$arch
==
"armv7l"
]
;
then
nwjs_version
=
"v0.17.6"
else
nwjs_version
=
"v0.24.4"
fi
fi
nwjs
=
"nwjs-sdk"
if
[[
$os
==
"win64"
]]
;
then
nwjs_dirname
=
${
nwjs
}
-
${
nwjs_version
}
-win-
${
arch
}
else
nwjs_dirname
=
${
nwjs
}
-
${
nwjs_version
}
-
${
os
}
-
${
arch
}
fi
nwjs_filename
=
${
nwjs_dirname
}
.
${
ext
}
nwjs_url
=
https://git.purrdata.net/jwilkes/nwjs-binaries/raw/master
nwjs_url
=
${
nwjs_url
}
/
$nwjs_filename
echo
"Fetching the nwjs binary from"
echo
"
$nwjs_url
"
if
!
wget
-nv
$nwjs_url
;
then
nwjs_url
=
https://dl.nwjs.io/
${
nwjs_version
}
/
$nwjs_filename
echo
"Fetching the nwjs binary from"
echo
"Fetching the nwjs binary from"
echo
"
$nwjs_url
"
echo
"
$nwjs_url
"
wget
-nv
$nwjs_url
if
!
wget
-nv
$nwjs_url
;
then
nwjs_url
=
https://dl.nwjs.io/
${
nwjs_version
}
/
$nwjs_filename
echo
"Fetching the nwjs binary from"
echo
"
$nwjs_url
"
wget
-nv
$nwjs_url
fi
fi
fi
if
[[
$os
==
"win"
||
$os
==
"win64"
||
$os
==
"osx"
]]
;
then
if
[[
$os
==
"win"
||
$os
==
"win64"
||
$os
==
"osx"
]]
;
then
unzip
$nwjs_filename
unzip
$nwjs_filename
nwjs_dirname
=
$(
basename
--suffix
=
.zip
$nwjs_filename
)
else
else
tar
-xf
$nwjs_filename
tar
-xf
$nwjs_filename
nwjs_dirname
=
$(
basename
--suffix
=
.tar.gz
$nwjs_filename
)
fi
fi
# Special case for arm binary's inconsistent directory name
# Special case for arm binary's inconsistent directory name
# (It's not the same as the `uname -m` output)
# (It's not the same as the `uname -m` output)
if
[
$arch
==
"
armv7l
"
]
;
then
if
echo
$nwjs_filename
|
grep
-q
armv7l
;
then
nwjs_dirname
=
`
echo
$nwjs_dirname
|
sed
's/armv7l/arm/'
`
nwjs_dirname
=
`
echo
$nwjs_dirname
|
sed
's/armv7l/arm/'
`
fi
fi
mv
$nwjs_dirname
../pd/nw/nw
mv
$nwjs_dirname
../pd/nw/nw
# make sure the nw binary is executable on GNU/Linux
# make sure the nw binary is executable on GNU/Linux
if
[[
$os
!=
"win"
&&
$dmg
==
0
]]
;
then
if
[[
$os
!=
"win"
&&
$dmg
==
0
]]
;
then
chmod
755 ../pd/nw/nw/nw
chmod
755 ../pd/nw/nw/nw
fi
fi
rm
$nwjs_filename
fi
fi
# For Windows, fetch the ASIO SDK if we don't have it already
# For Windows, fetch the ASIO SDK if we don't have it already
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment