Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/devel' into yearweek
Browse files Browse the repository at this point in the history
  • Loading branch information
capocasa committed Nov 22, 2021
2 parents e92c859 + 1b143f5 commit a2ea85b
Show file tree
Hide file tree
Showing 893 changed files with 39,691 additions and 17,345 deletions.
16 changes: 9 additions & 7 deletions .builds/freebsd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## DO NO EDIT DIRECTLY! auto-generated by `nim r tools/ci_generate.nim`

# see https://man.sr.ht/builds.sr.ht/compatibility.md#freebsd
image: freebsd/latest
packages:
Expand All @@ -8,23 +10,23 @@ packages:
- devel/sfml
- www/node
- devel/gmake


sources:
- https://github.com/nim-lang/Nim
environment:
NIM_TESTAMENT_BATCH: "0_1"
CC: /usr/bin/clang
tasks:
- setup: |
set -e
cd Nim
git clone --depth 1 -q https://github.com/nim-lang/csources.git
gmake -C csources -j $(sysctl -n hw.ncpu)
bin/nim c --skipUserCfg --skipParentCfg koch
. ci/funs.sh && nimBuildCsourcesIfNeeded
echo 'export PATH=$HOME/Nim/bin:$PATH' >> $HOME/.buildenv
- test: |
set -e
cd Nim
if ! ./koch runCI; then
nim c -r tools/ci_testresults.nim
exit 1
fi
. ci/funs.sh && nimInternalBuildKochAndRunCI
triggers:
- action: email
condition: failure
Expand Down
15 changes: 7 additions & 8 deletions .builds/openbsd_0.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## do not edit directly; auto-generated by `nim r tools/ci_generate.nim`
## DO NO EDIT DIRECTLY! auto-generated by `nim r tools/ci_generate.nim`

image: openbsd/latest
packages:
Expand All @@ -10,24 +10,23 @@ packages:
- sfml
- sdl2
- libffi


sources:
- https://github.com/nim-lang/Nim
environment:
NIM_TESTAMENT_BATCH: "0_2"
CC: /usr/bin/clang
tasks:
- setup: |
set -e
cd Nim
git clone --depth 1 -q https://github.com/nim-lang/csources.git
gmake -C csources -j $(sysctl -n hw.ncpuonline)
bin/nim c koch
. ci/funs.sh && nimBuildCsourcesIfNeeded
echo 'export PATH=$HOME/Nim/bin:$PATH' >> $HOME/.buildenv
- test: |
set -e
cd Nim
if ! ./koch runCI; then
nim c -r tools/ci_testresults.nim
exit 1
fi
. ci/funs.sh && nimInternalBuildKochAndRunCI
triggers:
- action: email
condition: failure
Expand Down
15 changes: 7 additions & 8 deletions .builds/openbsd_1.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## do not edit directly; auto-generated by `nim r tools/ci_generate.nim`
## DO NO EDIT DIRECTLY! auto-generated by `nim r tools/ci_generate.nim`

image: openbsd/latest
packages:
Expand All @@ -10,24 +10,23 @@ packages:
- sfml
- sdl2
- libffi


sources:
- https://github.com/nim-lang/Nim
environment:
NIM_TESTAMENT_BATCH: "1_2"
CC: /usr/bin/clang
tasks:
- setup: |
set -e
cd Nim
git clone --depth 1 -q https://github.com/nim-lang/csources.git
gmake -C csources -j $(sysctl -n hw.ncpuonline)
bin/nim c koch
. ci/funs.sh && nimBuildCsourcesIfNeeded
echo 'export PATH=$HOME/Nim/bin:$PATH' >> $HOME/.buildenv
- test: |
set -e
cd Nim
if ! ./koch runCI; then
nim c -r tools/ci_testresults.nim
exit 1
fi
. ci/funs.sh && nimInternalBuildKochAndRunCI
triggers:
- action: email
condition: failure
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
# duplicated, which is easily identifiable and fixable.
/changelog.md merge=union

# bug https://github.com/dom96/choosenim/issues/256 for WSL CRLF
*.sh text eol=lf
/config/build_config.txt text eol=lf
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ assignees: ''

---

(Consider writing a PR targetting devel branch after filing this, see [contributing.html](https://nim-lang.github.io/Nim/contributing.html)).

Function `echo` outputs the wrong string.

### Example
Expand Down
122 changes: 0 additions & 122 deletions .github/workflows/ci.yml.disabled

This file was deleted.

72 changes: 21 additions & 51 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,27 @@ on:

jobs:
build:
if: |
!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[skip ci]')
strategy:
fail-fast: false
matrix:
target: [linux, windows, osx]
include:
- target: linux
os: ubuntu-18.04
os: ubuntu-20.04
- target: windows
os: windows-2019
- target: osx
os: macos-10.15

name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60 # refs bug #18178

steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: 'Install build dependencies (macOS)'
if: runner.os == 'macOS'
Expand All @@ -59,64 +60,33 @@ jobs:
if: runner.os == 'Windows'
shell: bash
run: |
mkdir dist
curl -L https://nim-lang.org/download/mingw64.7z -o dist/mingw64.7z
curl -L https://nim-lang.org/download/dlls.zip -o dist/dlls.zip
7z x dist/mingw64.7z -odist
7z x dist/dlls.zip -obin
set -e
. ci/funs.sh
nimInternalInstallDepsWindows
echo "${{ github.workspace }}/dist/mingw64/bin" >> "${GITHUB_PATH}"
- name: 'Add build binaries to PATH'
shell: bash
run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}"

- name: 'Get current csources version'
id: csources-version
- name: 'System information'
shell: bash
run: |
sha=$(git ls-remote https://github.com/nim-lang/csources master | cut -f 1)
echo "::set-output name=sha::$sha"
run: . ci/funs.sh && nimCiSystemInfo

- name: 'Get prebuilt csources from cache'
id: csources-cache
uses: actions/cache@v1
with:
path: bin
key: '${{ matrix.os }}-${{ steps.csources-version.outputs.sha }}'

- name: 'Checkout csources'
if: steps.csources-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: nim-lang/csources
path: csources

- name: 'Build 1-stage compiler from csources'
- name: 'Build csourcesAny (posix)'
# this would work on windows and other CI use this on windows,
# but we ensure here that `ci/build_autogen.bat` keeps working on windows.
if: runner.os != 'Windows'
shell: bash
run: |
ext=
[[ '${{ runner.os }}' == 'Windows' ]] && ext=.exe
if [[ ! -x bin/nim-csources$ext ]]; then
ncpu=
case '${{ runner.os }}' in
'Linux')
ncpu=$(nproc)
;;
'macOS')
ncpu=$(sysctl -n hw.ncpu)
;;
'Windows')
ncpu=$NUMBER_OF_PROCESSORS
;;
esac
[[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1
run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc
# was previously using caching via `actions/cache@v1` but this wasn't
# used in other CI pipelines and it's unclear the added complexity
# was worth the saving; can be revisited if needed.

make -C csources -j $ncpu CC=gcc
cp bin/nim{,-csources}$ext
else
echo 'Cache hit, using prebuilt csources'
cp bin/nim{-csources,}$ext
fi
- name: 'Build csourcesAny (windows)'
if: runner.os == 'Windows'
shell: cmd
run: ci/build_autogen.bat

- name: 'Build koch'
shell: bash
Expand Down
Loading

0 comments on commit a2ea85b

Please sign in to comment.