Skip to content

Commit aa76d8e

Browse files
authored
Merge pull request #2325 from tweag/1.13.0-release
[release.sh] update to 1.13.0
2 parents 4c7765b + b45ac25 commit aa76d8e

File tree

7 files changed

+120
-58
lines changed

7 files changed

+120
-58
lines changed

.github/workflows/release-artifacts.yaml

Lines changed: 67 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -14,74 +14,93 @@ permissions:
1414

1515
jobs:
1616
release-artifacts:
17-
name: "Build Nickel binary and Docker image"
17+
name: "Build Nickel binary"
1818
strategy:
1919
matrix:
2020
os:
21-
- runs-on: ubuntu-latest
21+
- runs-on: ubuntu-24.04
2222
architecture: x86_64
23-
# We don't use the latest version of Ubuntu on the ARM runner because
24-
# rustc is likely to crash, see
25-
# https://github.com/rust-lang/rust/issues/135867. Do not update until
26-
# #135867 is fixed.
27-
- runs-on: ubuntu-22.04-arm
23+
rust_architecture: x86_64
24+
- runs-on: ubuntu-24.04-arm
2825
architecture: arm64
26+
rust_architecture: aarch64
27+
28+
# We build static binaries with an Alpine image. Hopefully this is temporary -- we'd like
29+
# to use the nix static binaries so that we can use the same build logic for CI and release.
30+
# However, the nix static builds currently force a rebuild of LLVM. The GitHub runners
31+
# are too small and slow for this. The tweag runners would work, but we don't have an arm64
32+
# linux runner. So for now, we get the static toolchain from alpine.
2933
runs-on: ${{ matrix.os.runs-on }}
34+
container:
35+
image: alpine:3.22
3036
steps:
31-
- uses: actions/checkout@v4
32-
with:
33-
ref: ${{ github.event_name == 'release' && '' || github.event.inputs.release_tag }}
34-
- uses: cachix/install-nix-action@v31
35-
name: "Installing Nix"
36-
with:
37-
extra_nix_config: |
38-
experimental-features = nix-command flakes
39-
accept-flake-config = true
40-
nix_path: "nixpkgs=channel:nixos-unstable"
41-
- name: "Build static binary"
37+
- name: "Install dev tools"
38+
run: |
39+
apk add rustup gcc musl-dev python3 github-cli git
40+
rustup-init -y --default-toolchain 1.88 --target x86_64-unknown-linux-musl,aarch64-unknown-linux-musl
41+
- name: "git checkout"
42+
run: |
43+
git clone https://github.com/tweag/nickel
44+
cd nickel
45+
git checkout ${{ github.event_name == 'release' && '' || github.event.inputs.release_tag }}
46+
- name: "Build static binaries"
4247
run: |
43-
nix build --log-format raw-with-logs .#nickel-static
44-
cp ./result/bin/nickel nickel-${{ matrix.os.architecture }}-linux
45-
cp ./result/bin/nls nls-${{ matrix.os.architecture }}-linux
46-
nix build --log-format raw-with-logs .#nickel-pkg-static
47-
cp ./result/bin/nickel nickel-pkg-${{ matrix.os.architecture }}-linux
48+
source $HOME/.cargo/env
49+
cd nickel
50+
cargo build --target ${{ matrix.os.rust_architecture }}-unknown-linux-musl -p nickel-lang-cli -p nickel-lang-lsp --release
51+
cp ./target/${{ matrix.os.rust_architecture }}-unknown-linux-musl/release/nickel nickel-${{ matrix.os.architecture }}-linux
52+
cp ./target/${{ matrix.os.rust_architecture }}-unknown-linux-musl/release/nls nls-${{ matrix.os.architecture }}-linux
53+
cargo build --target ${{ matrix.os.rust_architecture }}-unknown-linux-musl -p nickel-lang-cli --features=package-experimental --release
54+
cp ./target/${{ matrix.os.rust_architecture }}-unknown-linux-musl/release/nickel nickel-pkg-${{ matrix.os.architecture }}-linux
4855
- name: "Upload static binary as release asset"
4956
env:
5057
GH_TOKEN: ${{ github.token }}
5158
RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release_tag }}
5259
run: |
60+
cd nickel
5361
gh release upload --clobber $RELEASE_TAG nickel-${{ matrix.os.architecture }}-linux
5462
gh release upload --clobber $RELEASE_TAG nickel-pkg-${{ matrix.os.architecture }}-linux
5563
gh release upload --clobber $RELEASE_TAG nls-${{ matrix.os.architecture }}-linux
56-
- id: build-image
57-
name: "Build docker image"
58-
run: |
59-
nix build --log-format raw-with-logs .#dockerImage
60-
cp ./result nickel-${{ matrix.os.architecture }}-docker-image.tar.gz
61-
echo "imageName=$(nix eval --raw .#dockerImage.imageName)" >> "$GITHUB_OUTPUT"
62-
echo "imageTag=$(nix eval --raw .#dockerImage.imageTag)" >> "$GITHUB_OUTPUT"
63-
- name: "Upload docker image as release asset"
64-
env:
65-
GH_TOKEN: ${{ github.token }}
66-
RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release_tag }}
67-
run: |
68-
gh release upload --clobber $RELEASE_TAG nickel-${{ matrix.os.architecture }}-docker-image.tar.gz
69-
- name: Log in to registry
70-
# This is where you will update the personal access token to GITHUB_TOKEN
71-
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
72-
- name: Push image
73-
env:
74-
RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release_tag }}
75-
TARBALL_TAG: ${{ steps.build-image.outputs.imageName }}:${{ steps.build-image.outputs.imageTag }}
76-
run: |
77-
docker load -i nickel-${{ matrix.os.architecture }}-docker-image.tar.gz
78-
docker tag "$TARBALL_TAG" ghcr.io/tweag/nickel:$RELEASE_TAG-${{ matrix.os.architecture}}
79-
docker push ghcr.io/tweag/nickel:$RELEASE_TAG-${{ matrix.os.architecture}}
64+
65+
# This downloads the release binaries from the previous step and builds Docker containers
66+
# containing them. This is a duplication of the container-building logic that's currently
67+
# in the Nix flake.
68+
docker-image:
69+
name: "Assemble single-platform Docker image"
70+
strategy:
71+
matrix:
72+
os:
73+
- runs-on: ubuntu-24.04
74+
architecture: x86_64
75+
rust_architecture: x86_64
76+
- runs-on: ubuntu-24.04-arm
77+
architecture: arm64
78+
rust_architecture: aarch64
79+
80+
runs-on: ${{ matrix.os.runs-on }}
81+
needs: release-artifacts
82+
steps:
83+
- uses: actions/checkout@v4
84+
- name: Log in to registry
85+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
86+
- id: build-image
87+
name: "Build docker image"
88+
env:
89+
GH_TOKEN: ${{ github.token }}
90+
RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.release_tag }}
91+
run: |
92+
gh release download --clobber $RELEASE_TAG --pattern nickel-${{ matrix.os.architecture }}-linux -O nickel
93+
gh release download --clobber $RELEASE_TAG --pattern nls-${{ matrix.os.architecture }}-linux -O nls
94+
docker build -t ghcr.io/tweag/nickel:$RELEASE_TAG-${{ matrix.os.architecture }} .
95+
docker push ghcr.io/tweag/nickel:$RELEASE_TAG-${{ matrix.os.architecture }}
96+
docker save ghcr.io/tweag/nickel:$RELEASE_TAG-${{ matrix.os.architecture }} -o nickel-${{ matrix.os.architecture }}-docker-image.tar.gz
97+
gh release upload --clobber $RELEASE_TAG nickel-${{ matrix.os.architecture }}-docker-image.tar.gz
98+
8099

81100
docker-multiplatform-image:
82101
name: "Assemble multi-platform Docker image"
83102
runs-on: ubuntu-latest
84-
needs: release-artifacts
103+
needs: docker-image
85104
steps:
86105
- name: Log in to registry
87106
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ members = [
1515
resolver = "2"
1616

1717
[workspace.package]
18-
version = "1.12.0"
18+
version = "1.13.0"
1919
authors = ["The Nickel Team <[email protected]>"]
2020
license = "MIT"
2121
edition = "2021"
@@ -25,10 +25,10 @@ homepage = "https://nickel-lang.org"
2525
readme = "README.md"
2626

2727
[workspace.dependencies]
28-
nickel-lang-core = { version = "0.13.0", path = "./core", default-features = false }
28+
nickel-lang-core = { version = "0.14.0", path = "./core", default-features = false }
2929
nickel-lang-flock = { version = "0.1.0", path = "./flock" }
3030
nickel-lang-git = { version = "0.1.0", path = "./git" }
31-
nickel-lang-package = { version = "0.2.0", path = "./package" }
31+
nickel-lang-package = { version = "0.3.0", path = "./package" }
3232
nickel-lang-vector = { version = "0.1.0", path = "./vector" }
3333
nickel-lang-utils = { version = "0.1.0", path = "./utils" }
3434
lsp-harness = { version = "0.1.0", path = "./lsp/lsp-harness" }

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This Dockerfile is used for our release builds, because we distribute
2+
# docker images that provide Nickel binaries.
3+
4+
FROM scratch
5+
LABEL org.opencontainers.image.source="https://github.com/tweag/nickel" \
6+
org.opencontainers.image.description="Nickel: better configuration for less" \
7+
org.opencontainers.image.licenses="MIT";
8+
9+
COPY ./nickel /bin/nickel
10+
COPY ./nls /bin/nls
11+
12+
ENTRYPOINT ["/bin/nickel"]

RELEASES.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
Version 1.13 (2025-08-18)
2+
=========================
3+
4+
Nickel 1.13 includes various bug-fixes and some improvements to error messages,
5+
but no core language changes. There has been substantial work towards a new
6+
runtime representation, which will eventually reduce the interpreter's memory
7+
usage substantially (and it is also a step towards the upcoming bytecode
8+
interpreter).
9+
10+
LSP
11+
---
12+
13+
* Fix cache miss when pulling source file by a relative path by @L0r3m1p5um in https://github.com/tweag/nickel/pull/2276
14+
* Publish diagnostics for parsing errors in imported files by @L0r3m1p5um in https://github.com/tweag/nickel/pull/2299
15+
16+
Tooling
17+
-------
18+
19+
* Wrap App arguments in atoms by @jneem in https://github.com/tweag/nickel/pull/2287
20+
* Print more information for git errors by @jneem in https://github.com/tweag/nickel/pull/2283
21+
* [RFC007] Improve the runtime value representation (not yet used by the interpreter) by @yannham in https://github.com/tweag/nickel/pull/2282, https://github.com/tweag/nickel/pull/2288, https://github.com/tweag/nickel/pull/2290, https://github.com/tweag/nickel/pull/2297, https://github.com/tweag/nickel/pull/2303
22+
* Add format --check by @bthmc in https://github.com/tweag/nickel/pull/2309
23+
* [nix-experimental] Provide the proper base path to Nix with `%eval_nix%` by @yannham in https://github.com/tweag/nickel/pull/2314
24+
25+
Documentation
26+
-------------
27+
28+
* Fix formatting of doc/manual/package-management.md by @yannham in https://github.com/tweag/nickel/pull/2274
29+
* Fix missing package field in package manual example by @yannham in https://github.com/tweag/nickel/pull/2275
30+
* Update examples to use latest Nickel idioms by @yannham in https://github.com/tweag/nickel/pull/2289
31+
132
Version 1.12 (2025-06-04)
233
=========================
334

core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "nickel-lang-core"
3-
version = "0.13.0"
3+
version = "0.14.0"
44
description = "Programmable configuration files."
55
authors.workspace = true
66
edition.workspace = true

package/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "nickel-lang-package"
33
description = "Utility library for the Nickel Package Manager"
4-
version = "0.2.0"
4+
version = "0.3.0"
55

66
authors.workspace = true
77
edition.workspace = true

0 commit comments

Comments
 (0)