-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
ARG VERSION=2.0.2 | ||
|
||
FROM debian:unstable AS build | ||
RUN apt update && apt install -y build-essential wget git | ||
RUN adduser --disabled-password dev | ||
ARG VERSION | ||
USER dev | ||
ENV PATH="/home/dev/.nim/bin:$PATH" | ||
# choosenim doesn't work on arm64 D: | ||
#ENV CHOOSENIM_CHOOSE_VERSION=${NIM_VERSION} | ||
#RUN curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y && \ | ||
# nimble refresh | ||
RUN wget -nv https://nim-lang.org/download/nim-${VERSION}.tar.xz -O - \ | ||
| tar -xJ -C /tmp | ||
RUN cd /tmp/nim-${VERSION} \ | ||
&& ./build.sh \ | ||
&& bin/nim c koch \ | ||
&& ./koch boot -d:release \ | ||
&& ./koch tools \ | ||
&& ./install.sh /tmp/install-nim \ | ||
&& mv /tmp/install-nim/nim /home/dev/.nim \ | ||
&& cp ./bin/nimble /home/dev/.nim/bin/ \ | ||
&& nimble refresh | ||
|
||
FROM scratch | ||
COPY --from=build /home/dev/.nim /home/dev/.nim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Devkit (nim) | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
paths: | ||
- '.docker/nim.dockerfile' | ||
pull_request: | ||
paths: | ||
- '.docker/nim.dockerfile' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
# uses: ./.github/workflows/devkit.yml | ||
# with: | ||
# lang: nim | ||
# version: 2.0.2 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Publish | ||
uses: elgohr/Publish-Docker-Github-Action@main | ||
with: | ||
name: shish2k/rosettaboy-devkit-nim | ||
dockerfile: .docker/nim.dockerfile | ||
buildoptions: "--build-arg VERSION=2.0.2" | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
tags: 2.0.2 | ||
platforms: linux/amd64,linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Devkit | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
lang: | ||
required: true | ||
type: string | ||
version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
name: Build Container | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Publish | ||
uses: elgohr/Publish-Docker-Github-Action@main | ||
with: | ||
name: shish2k/rosettaboy-devkit-${{ inputs.lang }} | ||
dockerfile: .docker/${{ inputs.lang }}.dockerfile | ||
buildoptions: "--build-arg VERSION=${{ inputs.version }}" | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
tags: ${{ inputs.version }} | ||
platforms: linux/amd64,linux/arm64 |