Skip to content
/ nim-ci Public

A CI base image when building nim(lang) packages for Linux (native compilation) and Windows (cross compilation).

License

Notifications You must be signed in to change notification settings

hoijui/nim-ci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL v3 REUSE status

Nim(lang) CI base

A CI base docker image for when building Nim(lang) packages for Linux (native compilation) and Windows (cross compilation).

Features

  • Based on debian:latest
  • Uses ChooseNim to install Nim and Nimble
  • Contains the Windows 64bit version of Nim - This allows packaging required base-DLLs with the win64 binary. (TODO Check if they are required for running under wine only, or also on native windows?)

Usage

In your CI configuration, choose hoijui/nim-ci as the base (docker-)image. Then you are able to use nim and nimble for native-compiling (Linux 64bit), and additionally MinGW for cross-compiling (Windows 64bit).

Example for GitLab-CI

This .gitlab-ci.yml file compiles the software for Linux and Windows (both 64bit).

default:
  image: hoijui/nim-ci:latest

pages:
  script:
  - |
    echo
    echo "Compiling the software for Linux ..."
    nimble -y build
    echo
    echo "Cross-compiling the software for Windows 64 ..."
    nimble -y build \
      --os:windows \
      --cpu:amd64 \
      --gcc.exe:/usr/bin/x86_64-w64-mingw32-gcc \
      --gcc.linkerexe:/usr/bin/x86_64-w64-mingw32-gcc \
      -d:release \
      --app:console \
      --opt:size \
      --passL:-static \
      --opt:speed \
      --embedsrc \
      --threads:on \
      --checks:on
  only:
    - master
  artifacts:
    paths:
    - public

Example project (GitLab)

See the .gitlab-ci.yml of the osh-tool for a sample project that uses nim-ci.

About

A CI base image when building nim(lang) packages for Linux (native compilation) and Windows (cross compilation).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published