Skip to content

Commit 29850cf

Browse files
committed
Merge remote-tracking branch 'origin/master' into bump-llvm-10.0.0_3
2 parents a06d2e6 + b6bf225 commit 29850cf

File tree

8 files changed

+223
-5
lines changed

8 files changed

+223
-5
lines changed

docker/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ CRYSTAL_TARGZ ?= ## Which crystal.tar.gz file to install in docker images (a
1313
DOCKER_TAG ?= ## How to tag the docker image (examples: `0.27.2`, `nightly20190307`). `-build` will be appended for build images.
1414
DOCKER_REPOSITORY ?= ## Docker hub repository to commit image
1515

16+
GC_VERSION = v8.0.4
17+
LIBATOMIC_OPS_VERSION = v7.6.10
18+
1619
OUTPUT_DIR := build
1720
BUILD_CONTEXT := $(CURDIR)/build-context
1821
BUILD_ARGS_UBUNTU64 := --build-arg crystal_deb=crystal.deb $(BUILD_CONTEXT)/ubuntu64 --build-arg base_docker_image=ubuntu:focal
1922
BUILD_ARGS_UBUNTU32 := --build-arg crystal_deb=crystal.deb $(BUILD_CONTEXT)/ubuntu32 --build-arg base_docker_image=i386/ubuntu:bionic
20-
BUILD_ARGS_ALPINE := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/alpine
23+
BUILD_ARGS_ALPINE := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/alpine --build-arg gc_version=$(GC_VERSION) --build-arg libatomic_ops_version=$(LIBATOMIC_OPS_VERSION)
2124
DOCKER_TAG_UBUNTU := $(DOCKER_REPOSITORY):$(DOCKER_TAG)
2225
DOCKER_TAG_ALPINE := $(DOCKER_REPOSITORY):$(DOCKER_TAG)-alpine
2326

@@ -53,6 +56,8 @@ $(BUILD_CONTEXT)/ubuntu64: ubuntu.Dockerfile $(BUILD_CONTEXT)/ubuntu64/crystal.d
5356

5457
$(BUILD_CONTEXT)/alpine: alpine.Dockerfile $(BUILD_CONTEXT)/alpine/crystal.tar.gz
5558
cp alpine.Dockerfile $@/Dockerfile
59+
mkdir $@/files/
60+
cp ../linux/files/feature-thread-stackbottom-upstream.patch $@/files/feature-thread-stackbottom-upstream.patch
5661

5762
%/crystal.deb:
5863
mkdir -p $(shell dirname $@)

docker/alpine.Dockerfile

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,33 @@ FROM alpine:3.13 as runtime
33
RUN \
44
apk add --update --no-cache --force-overwrite \
55
# core dependencies
6-
gc-dev gcc gmp-dev libatomic_ops libevent-static musl-dev pcre-dev \
6+
gcc gmp-dev libevent-static musl-dev pcre-dev \
77
# stdlib dependencies
88
libxml2-dev openssl-dev openssl-libs-static tzdata yaml-static zlib-static \
99
# dev tools
10-
make git
10+
make git \
11+
# build libgc dependencies
12+
autoconf automake libtool patch
13+
14+
# Build libgc
15+
ARG gc_version
16+
ARG libatomic_ops_version
17+
COPY files/feature-thread-stackbottom-upstream.patch /tmp/
18+
RUN git clone https://github.com/ivmai/bdwgc \
19+
&& cd bdwgc \
20+
&& git checkout ${gc_version} \
21+
&& git clone https://github.com/ivmai/libatomic_ops \
22+
&& (cd libatomic_ops && git checkout ${libatomic_ops_version}) \
23+
\
24+
&& patch -p1 < /tmp/feature-thread-stackbottom-upstream.patch \
25+
\
26+
&& ./autogen.sh \
27+
&& ./configure --disable-debug --disable-shared --enable-large-config \
28+
&& make -j$(nproc) CFLAGS=-DNO_GETCONTEXT \
29+
&& make install
30+
31+
# Remove build tools from image now that libgc is built
32+
RUN apk del -r --purge autoconf automake libtool patch
1133

1234
ARG crystal_targz
1335
COPY ${crystal_targz} /tmp/crystal.tar.gz

linux/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ ARG musl_target
8888
RUN git clone https://github.com/crystal-lang/shards \
8989
&& cd shards \
9090
&& git checkout ${shards_version} \
91+
# FIXME: Remove this workaround for https://github.com/crystal-lang/crystal/issues/10861
92+
&& touch shard.lock \
9193
&& make SHARDS=false CRYSTAL=/crystal/bin/crystal \
9294
FLAGS="--stats --target ${musl_target} --static ${release:+--release}" \
9395
\

linux/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ PACKAGE_MAINTAINER = Crystal Team <[email protected]>
1919
PREVIOUS_CRYSTAL_RELEASE_LINUX64_TARGZ ?= ## url to crystal-{version}-{package}-linux-x86_64.tar.gz
2020
PREVIOUS_CRYSTAL_RELEASE_LINUX32_TARGZ ?= ## url to crystal-{version}-{package}-linux-i686.tar.gz
2121

22-
SHARDS_VERSION = v0.14.1
22+
SHARDS_VERSION = v0.15.0
2323
GC_VERSION = v8.0.4
2424
LIBATOMIC_OPS_VERSION = v7.6.10
2525

omnibus/config/software/shards.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SHARDS_VERSION = "0.14.1"
1+
SHARDS_VERSION = "0.15.0"
22

33
name "shards"
44
default_version SHARDS_VERSION
@@ -43,6 +43,10 @@
4343
source md5: "d7bdd10bb096b71428b06fc93097b3cc"
4444
end
4545

46+
version "0.15.0" do
47+
source md5: "696525e924350a1270eee5c221eb6c80"
48+
end
49+
4650
source url: "https://github.com/crystal-lang/shards/archive/v#{version}.tar.gz"
4751

4852
relative_path "shards-#{version}"

processes/crystal-CHANGELOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
- **(breaking-change)**
2+
- **(deprecate)**
3+
- Fixed ... ([#PR], thanks @author)
4+
- Fixed docs ...
5+
- Add ...
6+
- **(performance)**
7+
- Add docs ...
8+
- Refactor ...
9+
- Fix specs ...
10+
11+
## Language changes
12+
13+
### Macros
14+
15+
## Standard library
16+
17+
### Macros
18+
19+
### Numeric
20+
<!-- Int, Float, BigInt, ... -->
21+
22+
### Text
23+
<!-- String, Regex, ... -->
24+
25+
### Collections
26+
<!-- Array, Hash, Enumerable, ... -->
27+
28+
### Serialization
29+
<!-- YAML, JSON, ... -->
30+
31+
### Time
32+
33+
### Files
34+
35+
### Networking
36+
<!-- HTTP, Sockets, SSL, IO -->
37+
38+
### Logging
39+
40+
### Crypto
41+
42+
### Concurrency
43+
44+
### System
45+
46+
### Runtime
47+
48+
### Spec
49+
50+
## Compiler
51+
<!-- CLI -->
52+
53+
### Language semantics
54+
<!-- Codegen issues affecting semantic -->
55+
56+
### Debugger
57+
58+
## Tools
59+
60+
### Formatter
61+
62+
### Doc generator
63+
64+
### Playground
65+
66+
## Others

processes/crystal-release.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Crystal release process checklist
2+
3+
1. Submit a Freeze/Release PR
4+
* It should contain the expected date of the release (~two weeks after the PR is issued).
5+
* It should be populated with updates to CHANGELOG.md and VERSION.
6+
2. Verify Maintenance CI in the parent commit of the changelog succeed
7+
* This mean either the commit was the one used for nightly build or,
8+
* A branch with `release/` prefix or `ci` word was pushed
9+
3. Check the artifacts pass the ecosystem test
10+
* Grab latest copy of https://github.com/crystal-lang/test-ecosystem
11+
* Override branches of projects if needed at ./scripts/10-clone-repos.sh
12+
* Set `./crystal-versions.env` with the URL of the artifacts and with the docker image
13+
* Use the different make targets described in the `./README`
14+
4. Merge the Changelog PR
15+
5. Tag & annotate the commit with the changelog using `<M.m.p>` pattern as {version} (as a pre-release directly in GH?)
16+
6. Wait for the build
17+
7. Smoke test with test-ecosystem
18+
8. Push changes to OBS for building linux packages
19+
1. Checkout https://github.com/crystal-lang/distribution-scripts
20+
2. Grab the urls (or local path) of the artifacts from circle-ci
21+
* `crystal-*-linux-x86_64.tar.gz`
22+
* `crystal-*-linux-i686.tar.gz`
23+
* `crystal-*-docs.tar.gz`
24+
3. Follow [./packages/README.md](../packages/README.md) in distribution-scripts
25+
1. The following steps should run in an openSUSE distribution with osc installed (https://github.com/crystal-lang/osc-docker)
26+
1. Configure build.opensuse.org credentials in ~/.oscrc
27+
1. `osc branchco devel:languages:crystal crystal`
28+
1. `cd home\:$OBS_USERNAME\:branches\:devel\:languages\:crystal/crystal`
29+
1. Copy the updated build artifact tarballs in place
30+
1. Update version in package specifications:
31+
```bash
32+
VERSION=1.1.0 # or whatever version you’re releasing
33+
sed -i -e "s/^Version: .*/Version: ${VERSION}-1/" *.dsc
34+
sed -i -e "s/^Version: .*/Version: ${VERSION}/" *.spec
35+
```
36+
1. Verify the changes with `osc diff`
37+
1. Update changelog: `osc vc -m “Update devel:languages:crystal to $VERSION`
38+
1. Commit changes: `osc commit -m “Update devel:languages:crystal to $VERSION`
39+
1. Now OBS builds the packages. It’s best to continue in the browser now: https://build.opensuse.org/project/show/home:$OBS_USER:branches:devel:langauges:crystal/crystal
40+
1. Wait for all jobs to finish and when everything is green, create a submit request against the original package (“Submit package” link in the menu bar on the package in your branch)
41+
9. Build and publish docker images
42+
1. Checkout https://github.com/crystal-lang/crystal-dist
43+
2. `$ ./dist.sh build-docker {version}`
44+
3. `$ ./dist.sh push-docker {version}`
45+
4. Manually push the `crystallang/crystal:{version}` image as `crystallang/crystal:latest`
46+
* `$ docker tag crystallang/crystal:{version} crystallang/crystal:latest`
47+
* `$ docker push crystallang/crystal:latest`
48+
5. Manually build and push alpine images
49+
* Go to distribution-scripts/docker
50+
* `$ make clean alpine DOCKER_REPOSITORY=crystallang/crystal DOCKER_TAG={version} CRYSTAL_VERSION={version} CRYSTAL_TARGZ=~/Downloads/crystal-{version}-1-linux-x86_64.tar.gz`
51+
* `$ docker push crystallang/crystal:{version}-alpine`
52+
* `$ docker push crystallang/crystal:{version}-alpine-build`
53+
* `$ docker tag crystallang/crystal:{version}-alpine crystallang/crystal:latest-alpine`
54+
* `$ docker push crystallang/crystal:latest-alpine`
55+
10. Publish docs
56+
1. Have s3cmd installed and AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY env variables defined
57+
1. `$ source /Volumes/Secured/secure/manas-aws-key-crystal-dist.sh`
58+
1. Checkout https://github.com/crystal-lang/crystal-dist
59+
1. Download `*-docs.tar.gz` from circle-ci artifacts
60+
1. `$ ./dist.sh push-docs {version} path/to/crystal-{version}-docs.tar.gz`
61+
1. `$ ./dist.sh update-docs-versions {crystal_working_copy}`
62+
1. `$ ./dist.sh redirect-docs {version}`
63+
11. Publish snap package
64+
1. You need to logged in via `$ snapcraft login`
65+
1. Recent tagged release is published directly to edge channel. The CI logs the snap revision number. Otherwise the .snap file is in the artifacts.
66+
1. Check the current status to find the revision of the tagged release otherwise:
67+
1. `$ snapcraft status crystal`
68+
1. `$ snapcraft release crystal <revision-number> beta`
69+
1. `$ snapcraft release crystal <revision-number> stable`
70+
12. Build Github release
71+
1. Copy the changelog as release notes in the tag (if not done before)
72+
1. Upload the signed binaries, *.tar.gz and *.pkg artifacts
73+
1. Signed binaries are in bintray/build/signed
74+
1. Publish the Github release
75+
13. Submit a PR to update the homebrew formula in https://github.com/Homebrew/homebrew-core/blob/master/Formula/crystal.rb .
76+
1. Update the previous and new version (with their respective hashes).
77+
1. Try locally `$ brew install --build-from-source <source of formula>`
78+
1. Create PR
79+
14. Update crystal-website
80+
1. Post a release notes in the website
81+
1. Update information of `latest_release` in https://github.com/crystal-lang/crystal-website/blob/master/_config.yml
82+
1. Update link to blog in https://github.com/crystal-lang/crystal-website/blob/5905e5644fcb4863976d0ca69856edbd74091370/index.html#L26
83+
15. Post announcement in https://forum.crystal-lang.org/c/news/official
84+
16. Tweet about the release
85+
17. Post in Reddit
86+
18. Update crystal repo to use released version
87+
* Edit PREVIOUS_CRYSTAL_BASE_URL in `.circleci/config.yml`
88+
* Edit DOCKER_TEST_PREFIX in `bin/ci`
89+
* Edit `prepare_build` on_osx download package and folder
90+
* Edit ` .github/workflows/win.yml` to point to docker image
91+
* Edit `shell.nix` `latestCrystalBinary` using `nix-prefetch-url --unpack <url>`
92+
19. Increment VERSION file to the next minor and -dev suffix
93+
20. Perform uncomment/todos left in the repo
94+
21. Update carc.in / play.crystal-lang.org (by jhass)
95+
Note: This is done after Arch repos are updated
96+
97+
## Observable Helper
98+
99+
Build changelog lines
100+
https://observablehq.com/d/035be530d554ccdf
101+
102+
Check commit history
103+
https://observablehq.com/d/4937e5db876fe1d4

processes/shards-release.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Shards release process checklist
2+
3+
1. Submit a Release PR
4+
* Should contain updates to CHANGELOG, VERSION, shard.yml
5+
* Should contain updates to the man files with the release date
6+
`$ make clean docs SOURCE_DATE_EPOCH=$(gdate -d "YYYY-MM-DD" +"%s")` if it’s done ahead of time
7+
2. Merge the Changelog PR
8+
3. Tag & annotate the commit with the changelog using `v<M.m.p>` pattern as {version}
9+
* `git tag -s vX.X.X`
10+
* `git push --tags`
11+
4. Build Github release
12+
* Copy the changelog as release notes in the tag
13+
5. Update distribution-scripts
14+
* [linux/Makefile](../linux/Makefile)
15+
* [omnibus/config/software/shards.rb](../omnibus/config/software/shards.rb)
16+
6. Submit a PR to update the homebrew formula in https://github.com/Homebrew/homebrew-core/blob/master/Formula/crystal.rb . Or do it on Crystal release.

0 commit comments

Comments
 (0)