Skip to content

Commit

Permalink
Release 0.22.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dipinhora committed May 31, 2018
2 parents cf85a77 + 4f7b726 commit e2606bf
Show file tree
Hide file tree
Showing 17 changed files with 298 additions and 9 deletions.
1 change: 1 addition & 0 deletions .packaging/deb/compat
@@ -0,0 +1 @@
9
15 changes: 15 additions & 0 deletions .packaging/deb/control
@@ -0,0 +1,15 @@
Source: ponyc
Maintainer: Pony Core Team <buildbot@pony.groups.io>
Build-Depends: debhelper (>= 9.0.0), git, zlib1g-dev, libncurses5-dev, libssl-dev, libpcre2-dev, llvm-3.9, llvm-3.9-dev
Priority: optional
Standards-Version: 3.9.7
Section: devel

Package: ponyc
Priority: optional
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, zlib1g-dev, libssl-dev, libpcre2-dev, gcc
Description: pony language compiler
Compiler for the pony programming language.
Pony is an open-source, actor-model, capabilities-secure, high performance programming language
http://www.ponylang.org
66 changes: 66 additions & 0 deletions .packaging/deb/rules
@@ -0,0 +1,66 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
export DH_VERBOSE = 1


# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1)))
DEB_DISTRIBUTION = $(call dpkg_late_eval,DEB_DISTRIBUTION,dpkg-parsechangelog -SDistribution)

MAKE_OPTIONS := prefix=/usr

ifeq ($(DEB_HOST_ARCH),amd64)
ifeq ($(DEB_DISTRIBUTION),trusty)
MAKE_OPTIONS += arch=x86-64 tune=generic
else
MAKE_OPTIONS += arch=x86-64 tune=intel
endif
endif

ifeq ($(DEB_HOST_ARCH),s390x)
MAKE_OPTIONS += arch=z900 tune=z900
endif

ifeq ($(DEB_HOST_ARCH),armhf)
MAKE_OPTIONS += arch=armv7 tune=arm7
endif

# trusty, xenial and artful are on openssl 1.0
# artful and newer require PIC
ifeq (,$(filter $(DEB_DISTRIBUTION),trusty xenial artful))
MAKE_OPTIONS += default_ssl='openssl_1.1.0' default_pic=true
else
ifeq ($(DEB_DISTRIBUTION),artful)
MAKE_OPTIONS += default_pic=true
endif
endif


%:
dh $@

override_dh_auto_build:
env
uname -m
dh_auto_build -- $(MAKE_OPTIONS)

override_dh_auto_install:
dh_auto_install -- $(MAKE_OPTIONS)

override_dh_auto_test:
$(MAKE) test-ci $(MAKE_OPTIONS)

# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

1 change: 1 addition & 0 deletions .packaging/deb/source/format
@@ -0,0 +1 @@
3.0 (quilt)
88 changes: 88 additions & 0 deletions .packaging/rpm/ponyc.spec
@@ -0,0 +1,88 @@
%global ponyc_version %(ls %{_sourcedir} | egrep -o '[0-9]+\.[0-9]+\.[0-9]+' || cat ../../VERSION)
%global release_version 1

%ifarch x86_64
%global arch_build_args arch=x86-64 tune=intel
%endif

%if 0%{?el7}
%global arch_build_args arch=x86-64 tune=generic LLVM_CONFIG=/usr/lib64/llvm3.9/bin/llvm-config
%global extra_build_args use="llvm_link_static"
%else
%if %{?_vendor} == suse
%global extra_build_args default_ssl='openssl_1.1.0'
%else
%global extra_build_args default_ssl='openssl_1.1.0' LLVM_CONFIG=/usr/lib64/llvm3.9/bin/llvm-config
%endif
%endif

Name: ponyc
Version: %{ponyc_version}
Release: %{release_version}%{?dist}
Packager: Pony Core Team <buildbot@pony.groups.io>
Summary: Compiler for the pony programming language.
# For a breakdown of the licensing, see PACKAGE-LICENSING
License: BSD
URL: https://github.com/ponylang/ponyc
Source0: https://github.com/ponylang/ponyc/archive/%{version}.tar.gz
BuildRequires: git
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: pcre2-devel
BuildRequires: zlib-devel
BuildRequires: ncurses-devel

%if %{?_vendor} == suse
BuildRequires: libopenssl-devel
BuildRequires: binutils-gold
BuildRequires: llvm-devel
%else
BuildRequires: openssl-devel
BuildRequires: libatomic
BuildRequires: llvm3.9-devel
%endif

%if 0%{?el7}
BuildRequires: llvm3.9-static
%endif

Requires: gcc-c++
Requires: openssl-devel
Requires: pcre2-devel

%if %{?_vendor} == suse
Requires: binutils-gold
%endif

%description
Compiler for the pony programming language.

Pony is an open-source, actor-model, capabilities-secure, high performance programming language
http://www.ponylang.org

%global debug_package %{nil}

%prep
%setup

%build
%{?build_command_prefix}make %{?arch_build_args} %{?extra_build_args} prefix=/usr %{?_smp_mflags} test-ci%{?build_command_postfix}

%install
%{?build_command_prefix}make install %{?arch_build_args} %{?extra_build_args} prefix=%{_prefix} DESTDIR=$RPM_BUILD_ROOT%{?build_command_postfix}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%{_prefix}/bin/ponyc
%{_prefix}/lib/libponyrt-pic.a
%{_prefix}/lib/libponyc.a
%{_prefix}/lib/pony
%{_prefix}/lib/libponyrt.a
%{_prefix}/include/pony.h
%{_prefix}/include/pony

%changelog
* Tue May 29 2018 Dipin Hora <dipin@wallaroolabs.com> 0.22.2-1
- Initial version of spec file
Binary file added .securefiles.tar.enc
Binary file not shown.
8 changes: 8 additions & 0 deletions .travis.yml
Expand Up @@ -8,6 +8,14 @@ branches:
dist: trusty
sudo: required

# NOTE: This holds fedora COPR API related variables. Unfortunately, the values expire every 180 days.
# As a result, we have to remember to visit https://copr.fedorainfracloud.org/api/ and generate a new token
# and then run the following to update variables and replace the "secure" value.
# travis encrypt COPR_LOGIN=VALUE COPR_TOKEN=VALUE --org -r ponylang/ponyc
env:
global:
secure: "YoSty8dHJOOj52w7Y1ycbO95GCNIGxAr0ZujtiINreMp4u6zAGkehYAy4rnPtDzbhwEf3SoQLegnG+yxg5TOaNejUJw85ZD1FgzAHOTbxHJAzLMnj544TuXt37Pd34m/P1FgG9OuGdMJQMaTBVCaOEeZ7y54fXcXpTQFH6gnDCRqRA0UQRZNR4Y6AtkDt5rfiwbQG3KJhb7oSydF7MgDOK9D+D5M40L4ANjAp1e8Imu4YMXZUUhZs2Vy49LQWOWD2Kuv0MOZt9W4ISrPaSR7lDMvtaWsScU+asrji/Jnc68SBmjCcU4sMxY0WeBF3fzu5h7VP7Yovkxju4e0UQG0PI/EEYukgw5b6k9za6flTczqs+pLIVhPwBWIE943nhqrLE9/l00vEpVBBj4X1iofrT9r4TSmaMzewZQx3cX4IOmwSuHA14NPUapXgwrP97ANtk+mkYg4HJ9W1e5/nD7juGBondfDTp/cW1z+1PUN4PQZrJJ9UFbryX51/2YB/8K5mdU970qcdsrljcB9WSxTUCogo+s6bc/hFUmH6BRmN10x10wrGbO62J/v0PpxKtymwSqAwvkr2cDejrCfm3bS/6Uoqo7gC6smTOlKSH8rEdLty1lA584/rXL0VvfjtUrn94g5BCkV1jRlufT33hv3nQjpkpCRokt0phKUQLxjv8c="

matrix:
include:
- os: linux
Expand Down
73 changes: 73 additions & 0 deletions .travis_commands.bash
Expand Up @@ -8,6 +8,79 @@ ponyc-test(){
make CC="$CC1" CXX="$CXX1" test-ci
}

build_and_submit_deb_src(){
deb_distro=$1
rm -f debian/changelog
dch --package ponyc -v "${package_version}-0ppa1~${deb_distro}" -D "${deb_distro}" --controlmaint --create "Release ${package_version}"
if [[ "$deb_distro" == "trusty" ]]
then
EDITOR=/bin/true dpkg-source --commit . removepcredep
fi
debuild -S
dput custom-ppa "../ponyc_${package_version}-0ppa1~${deb_distro}_source.changes"
}

ponyc-kickoff-copr-ppa(){
package_version=$(cat VERSION)

echo "Install debuild, dch, dput..."
sudo apt-get install -y devscripts build-essential lintian debhelper python-paramiko

echo "Decrypting and Importing gpg keys..."
# Disable shellcheck error SC2154 for uninitialized variables as these get set by travis-ci for us.
# See the following for error details: https://github.com/koalaman/shellcheck/wiki/SC2154
# shellcheck disable=SC2154
openssl aes-256-cbc -K "$encrypted_9035f6d310e4_key" -iv "$encrypted_9035f6d310e4_iv" -in .securefiles.tar.enc -out .securefiles.tar -d
tar -xvf .securefiles.tar
gpg --import ponylang-secret-gpg.key
gpg --import-ownertrust ponylang-ownertrust-gpg.txt
mv sshkey ~/sshkey
sudo chmod 600 ~/sshkey

echo "Kicking off ponyc packaging for PPA..."
wget "https://github.com/ponylang/ponyc/archive/${package_version}.tar.gz" -O "ponyc_${package_version}.orig.tar.gz"
tar -xvzf "ponyc_${package_version}.orig.tar.gz"
cd "ponyc-${package_version}"
cp -r .packaging/deb debian
cp LICENSE debian/copyright

# ssh stuff for launchpad as a workaround for https://github.com/travis-ci/travis-ci/issues/9391
{
echo "[custom-ppa]"
echo "fqdn = ppa.launchpad.net"
echo "method = sftp"
echo "incoming = ~ponylang/ubuntu/ponylang/"
echo "login = ponylang"
echo "allow_unsigned_uploads = 0"
} >> ~/.dput.cf

mkdir -p ~/.ssh
{
echo "Host ppa.launchpad.net"
echo " StrictHostKeyChecking no"
echo " IdentityFile ~/sshkey"
} >> ~/.ssh/config
sudo chmod 400 ~/.ssh/config

build_and_submit_deb_src xenial
build_and_submit_deb_src artful
build_and_submit_deb_src bionic
build_and_submit_deb_src cosmic

# run trusty last because we will modify things to not rely on pcre2
# remove pcre dependency from package and tests
sed -i 's/, libpcre2-dev//g' debian/control
sed -i 's#use glob#//use glob#g' packages/stdlib/_test.pony
sed -i 's#glob.Main.make#None//glob.Main.make#g' packages/stdlib/_test.pony
sed -i 's#use regex#//use regex#g' packages/stdlib/_test.pony
sed -i 's#regex.Main.make#//regex.Main.make#g' packages/stdlib/_test.pony
build_and_submit_deb_src trusty

# COPR for fedora/centos/suse
echo "Kicking off ponyc packaging for COPR..."
docker run -it --rm -e COPR_LOGIN="${COPR_LOGIN}" -e COPR_USERNAME=ponylang -e COPR_TOKEN="${COPR_TOKEN}" -e COPR_COPR_URL=https://copr.fedorainfracloud.org mgruener/copr-cli buildscm --clone-url https://github.com/ponylang/ponyc --commit "${package_version}" --subdir /.packaging/rpm/ --spec ponyc.spec --type git --nowait ponylang
}

ponyc-build-packages(){
echo "Installing ruby, rpm, and fpm..."
rvm use 2.2.3 --default
Expand Down
1 change: 1 addition & 0 deletions .travis_script.bash
Expand Up @@ -16,6 +16,7 @@ case "${TRAVIS_OS_NAME}" in
download_llvm
download_pcre
set_linux_compiler
ponyc-kickoff-copr-ppa
ponyc-build-packages
ponyc-build-docs
fi
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,13 @@

All notable changes to the Pony compiler and standard library will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com/).

## [0.22.3] - 2018-05-31

### Fixed

- Only enable mcx16 for gcc for x86_64 targets ([PR #2725](https://github.com/ponylang/ponyc/pull/2725))
- Fix String.concat ignoring the len parameter ([PR #2723](https://github.com/ponylang/ponyc/pull/2723))

## [0.22.2] - 2018-05-26

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -119,7 +119,7 @@ BITS := $(bits)
UNAME_M := $(shell uname -m)

ifeq ($(BITS),64)
ifneq ($(UNAME_M),aarch64)
ifeq ($(UNAME_M),x86_64)
BUILD_FLAGS += -mcx16
LINKER_FLAGS += -mcx16
endif
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -38,6 +38,7 @@ If you want a quick way to test or run code, checkout the [Playground](https://p
- [pony-snippets](https://github.com/SeanTAllen/pony-snippets)
* BBEdit: [bbedit-pony](https://github.com/TheMue/bbedit-pony)
* Micro: [micro-pony-plugin](https://github.com/Theodus/micro-pony-plugin)
* Nano: [pony.nanorc file](https://github.com/serialhex/nano-highlight/blob/master/pony.nanorc)

# Installation

Expand Down
27 changes: 21 additions & 6 deletions RELEASE_PROCESS.md
Expand Up @@ -14,6 +14,7 @@ While not strictly required, your life will be made much easier if you:
* Have a [bintray account](https://bintray.com/) and have been granted access `pony-language` organization by a "release admin".
* Have read and write access to the ponylang [travis-ci](https://travis-ci.org) account
* Have read and write access to the ponylang [appveyor](https://www.appveyor.com) account
* Have read and write access to the ponylang [dockerhub organization](https://hub.docker.com/u/ponylang/dashboard/)

## Prerequisites for specific releases

Expand Down Expand Up @@ -80,6 +81,18 @@ Leave a comment on the GitHub issue for this release letting @stefantalpalaru kn

There's no real Nix release. However, @kamilchm is maintaining Nix Pony packages. Drop him a note on the GitHub issue so he is aware of the release.

### Update the GitHub issue as needed

At this point we are basically waiting on Travis, Appveyor and Homebrew. As each finishes, leave a note on the GitHub issue for this release letting everyone know where we stand status wise. For example: "Release 0.3.1 is now available via Homebrew".

### Work on the release notes

We do a blog post announcing each release. The release notes blog post should include highlights of any particularly interesting changes that we want the community to be aware of.

Additionally, any breaking changes that require end users to change their code should be discussed and examples of how to update their code should be included.

[Examples of prior release posts](https://www.ponylang.org/categories/release) are available. If you haven't written release notes before, you should review prior examples to get a feel what should be included.

### Wait on Travis and Appveyor

During the time since you push to the release branch, Travis CI and Appveyor have been busy building release artifacts. This can take up to a couple hours depending on how busy they are. Periodically check bintray to see if the releases are there yet.
Expand Down Expand Up @@ -112,17 +125,19 @@ If the formulae has been successfully updated, you'll see the new download url i

Note that its often quite quick to get everything through Homebrew's CI and merge process, however its often quite slow as well. We've seen their Jenkins CI often fail with errors that are unrelated to PR in question. Don't wait too long on Homebrew. If it hasn't passed CI and been merged within a couple hours move ahead without it having passed. If Homebrew is being slow about merging, when you inform IRC and pony-user of the release, note that the Homebrew version isn't available yet and include a link to the Homebrew PR and the ponyc Github release issue so that people can follow along. When the Homebrew PR is eventually merged, update pony-user and IRC.

### Update the GitHub issue as needed
### Wait on Docker images to be built

At this point we are basically waiting on Travis, Appveyor and Homebrew. As each finishes, leave a note on the GitHub issue for this release letting everyone know where we stand status wise. For example: "Release 0.3.1 is now available via Homebrew".
As part of every release, 3 docker images are built:

### Work on the release notes
- latest
- release
- and a release version such as 0.3.1

We do a blog post announcing each release. The release notes blog post should include highlights of any particularly interesting changes that we want the community to be aware of.
Visit the ponylang dockerhub organization [build page](https://hub.docker.com/r/ponylang/ponyc/builds/) and verify that all 3 images were successfully built.

Additionally, any breaking changes that require end users to change their code should be discussed and examples of how to update their code should be included.
### Verify that the Pony Playground updated to the new version

[Examples of prior release posts](https://www.ponylang.org/categories/release) are available. If you haven't written release notes before, you should review prior examples to get a feel what should be included.
Once the dockerhub images have been updated, visit the [Pony Playground](https://playground.ponylang.org/) and verify that it has been updated to the correct version by compiling some code and checking the compiler version number in the output.

### Inform #ponylang

Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.22.2
0.22.3
2 changes: 2 additions & 0 deletions packages/builtin/string.pony
Expand Up @@ -886,6 +886,8 @@ actor Main
else
return
end

n = n + 1
end
end

Expand Down
10 changes: 10 additions & 0 deletions packages/builtin_test/_test.pony
Expand Up @@ -51,6 +51,7 @@ actor Main is TestList
test(_TestStringRecalc)
test(_TestStringTruncate)
test(_TestStringChop)
test(_TestStringConcatOffsetLen)
test(_TestSpecialValuesF32)
test(_TestSpecialValuesF64)
test(_TestArrayAppend)
Expand Down Expand Up @@ -1092,6 +1093,15 @@ class iso _TestStringChop is UnitTest
h.assert_eq[String box](expected_left, consume left)
h.assert_eq[String box](expected_right, consume right)

class iso _TestStringConcatOffsetLen is UnitTest
"""
Test String.concat working correctly for non-default offset and len arguments
"""
fun name(): String => "builtin/String.concat"

fun apply(h: TestHelper) =>
h.assert_eq[String](recover String.>concat("ABCD".values(), 1, 2) end, "BC")

class iso _TestArrayAppend is UnitTest
fun name(): String => "builtin/Array.append"

Expand Down

0 comments on commit e2606bf

Please sign in to comment.