Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: janet-lang/janet
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.21.0
Choose a base ref
...
head repository: janet-lang/janet
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Mar 22, 2022

  1. Copy the full SHA
    c998693 View commit details
  2. Copy the full SHA
    ab910d0 View commit details
  3. Copy the full SHA
    e9870b2 View commit details

Commits on Mar 23, 2022

  1. Merge pull request #937 from cellularmitosis/clock1012

    Mac clock shim not needed after 10.12
    bakpakin authored Mar 23, 2022
    Copy the full SHA
    9d0da74 View commit details

Commits on Mar 27, 2022

  1. Copy the full SHA
    7491421 View commit details

Commits on Mar 30, 2022

  1. Correct version 1.21.1 in meson.build

    This causes incorrect version meson compiles (including homebrew)
    Techcable authored Mar 30, 2022
    Copy the full SHA
    54e3db4 View commit details
  2. Merge pull request #942 from Techcable/patch-1

    Correct version 1.21.1 in meson.build
    bakpakin authored Mar 30, 2022
    Copy the full SHA
    5811b47 View commit details

Commits on Mar 31, 2022

  1. Copy the full SHA
    43139b4 View commit details

Commits on Apr 2, 2022

  1. Update SONAME in Makefile.

    bakpakin committed Apr 2, 2022
    Copy the full SHA
    f05e5f9 View commit details
  2. Copy the full SHA
    2a950e4 View commit details

Commits on Apr 6, 2022

  1. Copy the full SHA
    f74df41 View commit details
  2. Merge pull request #943 from cellularmitosis/make

    Produce dylibs on macOS
    bakpakin authored Apr 6, 2022
    Copy the full SHA
    a2ba091 View commit details

Commits on Apr 13, 2022

  1. Use defdyn for syspath in boot.janet

    sogaiu committed Apr 13, 2022
    Copy the full SHA
    bf9a60f View commit details
  2. Merge pull request #949 from sogaiu/syspath-defdyn

    Use defdyn for syspath in boot.janet
    bakpakin authored Apr 13, 2022
    Copy the full SHA
    e474755 View commit details
  3. Copy the full SHA
    1aac048 View commit details
  4. Copy the full SHA
    a964b16 View commit details

Commits on Apr 14, 2022

  1. Copy the full SHA
    d5a5c49 View commit details

Commits on Apr 15, 2022

  1. Merge pull request #952 from rick2600/master

    #951 - fix unchecked count in cfun_buffer_new_filled
    bakpakin authored Apr 15, 2022
    Copy the full SHA
    bbd74b5 View commit details

Commits on Apr 16, 2022

  1. Copy the full SHA
    e01b65f View commit details

Commits on Apr 17, 2022

  1. string.c docstrings

    Add backticks around code values to distinguish them from prose.
    uvtc authored Apr 17, 2022
    Copy the full SHA
    181d883 View commit details
  2. Update .gitattributes

    Github now supports Janet.
    uvtc authored Apr 17, 2022
    Copy the full SHA
    b1050b8 View commit details
  3. Merge pull request #956 from uvtc/patch-3

    Update .gitattributes
    bakpakin authored Apr 17, 2022
    Copy the full SHA
    8a3eff3 View commit details
  4. Merge pull request #955 from uvtc/patch-2

    string.c docstrings
    bakpakin authored Apr 17, 2022
    Copy the full SHA
    0d1a5c6 View commit details
  5. array.c docstrings

    Added some backticks around code in docstrings to distinguish from prose.
    uvtc authored Apr 17, 2022
    Copy the full SHA
    be24592 View commit details
  6. buffer.c docstrings

    Added backticks around code in docstrings to distinguish from prose.
    uvtc authored Apr 17, 2022
    Copy the full SHA
    8c52dc8 View commit details

Commits on Apr 18, 2022

  1. io.c docstrings

    Added some backticks around code in docstrings to distinguish them from prose.
    uvtc authored Apr 18, 2022
    Copy the full SHA
    c805878 View commit details
  2. math.c

    Fix typo, and backticks around one word.
    uvtc authored Apr 18, 2022
    Copy the full SHA
    0dd9108 View commit details
  3. os.c docstrings

    Some code backticks in docstrings where useful. Also some light editing of punctuation, etc.
    uvtc authored Apr 18, 2022
    Copy the full SHA
    811125a View commit details
  4. parse.c docstrings

    Added some backticks around code in docstrings to distinguish them from prose.
    uvtc authored Apr 18, 2022
    Copy the full SHA
    2bffb9d View commit details
  5. Merge pull request #957 from uvtc/patch-2

    array.c docstrings
    bakpakin authored Apr 18, 2022
    Copy the full SHA
    1e66a7e View commit details
  6. Merge pull request #958 from uvtc/patch-3

    buffer.c docstrings
    bakpakin authored Apr 18, 2022
    Copy the full SHA
    84a7a2b View commit details
  7. Merge pull request #962 from uvtc/patch-7

    parse.c docstrings
    bakpakin authored Apr 18, 2022
    Copy the full SHA
    0310176 View commit details
  8. Merge pull request #961 from uvtc/patch-6

    os.c docstrings
    bakpakin authored Apr 18, 2022
    Copy the full SHA
    51ac9c9 View commit details
  9. Merge pull request #959 from uvtc/patch-4

    io.c docstrings
    bakpakin authored Apr 18, 2022
    Copy the full SHA
    0b105bc View commit details
  10. Merge pull request #960 from uvtc/patch-5

    math.c
    bakpakin authored Apr 18, 2022
    Copy the full SHA
    9986aab View commit details
  11. table.c docstrings

    Added some backticks around code in docstrings to distinguish them from prose.
    
    Light editing to `table/raw-get`. Is my change there correct? (t --> the key)
    uvtc authored Apr 18, 2022
    Copy the full SHA
    8329131 View commit details
  12. tuple.c docstrings

    Added some backticks around code in docstrings to distinguish them from prose.
    uvtc authored Apr 18, 2022
    Copy the full SHA
    690b98b View commit details
  13. boot.janet

    Added some backticks around code in docstrings to distinguish them from prose.
    uvtc authored Apr 18, 2022
    Copy the full SHA
    9660261 View commit details
  14. Merge pull request #965 from uvtc/patch-2

    boot.janet docstrings
    bakpakin authored Apr 18, 2022
    Copy the full SHA
    8466b33 View commit details
  15. Merge pull request #963 from uvtc/patch-8

    table.c docstrings
    bakpakin authored Apr 18, 2022
    Copy the full SHA
    04ace9f View commit details
  16. Merge pull request #964 from uvtc/patch-9

    tuple.c docstrings
    bakpakin authored Apr 18, 2022
    Copy the full SHA
    e22936f View commit details

Commits on Apr 19, 2022

  1. boot.janet docstrings (part 2)

    Added some backticks around code in docstrings to distinguish them from prose.
    
    Also some light editing.
    uvtc authored Apr 19, 2022
    Copy the full SHA
    9287b26 View commit details

Commits on Apr 20, 2022

  1. Merge pull request #966 from uvtc/patch-2

    boot.janet docstrings (part 2)
    bakpakin authored Apr 20, 2022
    Copy the full SHA
    7f23bfa View commit details
  2. boot.janet docstrings (part 3, last part)

    Added some backticks around code in docstrings to distinguish them from prose.
    
    Also some light editing.
    uvtc authored Apr 20, 2022
    Copy the full SHA
    471204b View commit details

Commits on Apr 21, 2022

  1. Merge pull request #967 from uvtc/patch-2

    boot.janet docstrings (part 3, last part)
    bakpakin authored Apr 21, 2022
    Copy the full SHA
    c38d913 View commit details

Commits on Apr 23, 2022

  1. Add janet.h (in addition to janet/janet.h) on install.

    A number of bindings (many of which I have written) include
    <janet.h> rather than <janet/janet.h>.
    bakpakin committed Apr 23, 2022
    Copy the full SHA
    6db796e View commit details
  2. Copy the full SHA
    726d35c View commit details

Commits on Apr 24, 2022

  1. Address #950 - add defn suggestion on bad def.

    While generally we are not in the business of making a very chatty
    compiler, this is a simple improvement that involves compiling
    metadata before the binding, as well as adding a suggestion for `defn`
    in case the compiler encounters an unexpected tuple.
    bakpakin committed Apr 24, 2022
    Copy the full SHA
    b4ec168 View commit details

Commits on Apr 28, 2022

  1. Address #968 Ignore :pipe arguments in os/execute.

    They are only useful in os/spawn. Also update docstrings.
    bakpakin committed Apr 28, 2022
    Copy the full SHA
    73f5c41 View commit details
  2. Fix os/execute regression.

    bakpakin committed Apr 28, 2022
    Copy the full SHA
    427f7c3 View commit details
Showing with 18,471 additions and 6,409 deletions.
  1. +2 −1 .builds/freebsd.yml
  2. +5 −0 .builds/linux.yml
  3. +3 −3 .builds/openbsd.yml
  4. +1 −2 .gitattributes
  5. +38 −0 .github/cosmo/build
  6. +21 −0 .github/cosmo/setup
  7. +42 −0 .github/workflows/codeql.yml
  8. +64 −1 .github/workflows/release.yml
  9. +106 −2 .github/workflows/test.yml
  10. +17 −2 .gitignore
  11. +260 −5 CHANGELOG.md
  12. +18 −1 CONTRIBUTING.md
  13. +1 −1 LICENSE
  14. +103 −37 Makefile
  15. +175 −75 README.md
  16. +24 −13 build_win.bat
  17. +35 −0 examples/chatserver.janet
  18. +45 −0 examples/evlocks.janet
  19. +71 −0 examples/ffi/gtk.janet
  20. +227 −0 examples/ffi/so.c
  21. +150 −0 examples/ffi/test.janet
  22. +7 −0 examples/ffi/win32.janet
  23. BIN examples/jitfn/hello.bin
  24. +17 −0 examples/jitfn/hello.nasm
  25. +13 −0 examples/jitfn/jitfn.janet
  26. +2 −0 examples/lineloop.janet
  27. +30 −0 examples/marshal-stress.janet
  28. +5 −0 examples/posix-exec.janet
  29. +1 −0 examples/sample-bad-bundle/badmod.janet
  30. +7 −0 examples/sample-bad-bundle/bundle.janet
  31. +1 −0 examples/sample-bundle-aliases/aliases-mod.janet
  32. +3 −0 examples/sample-bundle-aliases/bundle.janet
  33. +4 −0 examples/sample-bundle-aliases/info.jdn
  34. +4 −0 examples/sample-bundle/bundle/info.jdn
  35. +3 −0 examples/sample-bundle/bundle/init.janet
  36. +7 −0 examples/sample-bundle/mymod.janet
  37. +4 −0 examples/sample-dep1/bundle/info.jdn
  38. +3 −0 examples/sample-dep1/bundle/init.janet
  39. +3 −0 examples/sample-dep1/dep1.janet
  40. +3 −0 examples/sample-dep2/bundle/info.jdn
  41. +3 −0 examples/sample-dep2/bundle/init.janet
  42. +3 −0 examples/sample-dep2/dep2.janet
  43. +41 −0 examples/sigaction.janet
  44. +20 −0 examples/weak-tables.janet
  45. +18 −2 janet.1
  46. +106 −44 meson.build
  47. +9 −3 meson_options.txt
  48. +1 −1 src/boot/array_test.c
  49. +1 −1 src/boot/boot.c
  50. +1,901 −971 src/boot/boot.janet
  51. +1 −1 src/boot/buffer_test.c
  52. +1 −1 src/boot/number_test.c
  53. +7 −3 src/boot/system_test.c
  54. +1 −1 src/boot/table_test.c
  55. +8 −2 src/conf/janetconf.h
  56. +72 −16 src/core/abstract.c
  57. +60 −13 src/core/array.c
  58. +110 −8 src/core/asm.c
  59. +254 −29 src/core/buffer.c
  60. +294 −1 src/core/bytecode.c
  61. +185 −29 src/core/capi.c
  62. +33 −30 src/core/cfuns.c
  63. +100 −20 src/core/compile.c
  64. +20 −6 src/core/compile.h
  65. +303 −162 src/core/corelib.c
  66. +34 −7 src/core/debug.c
  67. +5 −2 src/core/emit.c
  68. +1 −1 src/core/emit.h
  69. +1,014 −639 src/core/ev.c
  70. +31 −5 src/core/features.h
  71. +1,899 −0 src/core/ffi.c
  72. +41 −21 src/core/fiber.c
  73. +4 −1 src/core/fiber.h
  74. +688 −0 src/core/filewatch.c
  75. +168 −16 src/core/gc.c
  76. +6 −2 src/core/gc.h
  77. +122 −52 src/core/inttypes.c
  78. +112 −97 src/core/io.c
  79. +236 −41 src/core/marsh.c
  80. +71 −47 src/core/math.c
  81. +275 −85 src/core/net.c
  82. +773 −209 src/core/os.c
  83. +76 −48 src/core/parse.c
  84. +271 −28 src/core/peg.c
  85. +101 −23 src/core/pp.c
  86. +11 −1 src/core/regalloc.c
  87. +2 −1 src/core/regalloc.h
  88. +35 −19 src/core/run.c
  89. +271 −104 src/core/specials.c
  90. +13 −3 src/core/state.c
  91. +32 −9 src/core/state.h
  92. +72 −44 src/core/string.c
  93. +61 −5 src/core/strtod.c
  94. +12 −1 src/core/struct.c
  95. +3 −1 src/core/symcache.c
  96. +1 −1 src/core/symcache.h
  97. +66 −18 src/core/table.c
  98. +38 −9 src/core/tuple.c
  99. +284 −47 src/core/util.c
  100. +57 −7 src/core/util.h
  101. +54 −17 src/core/value.c
  102. +2 −2 src/core/vector.c
  103. +1 −1 src/core/vector.h
  104. +130 −37 src/core/vm.c
  105. +13 −14 src/core/wrap.c
  106. +284 −154 src/include/janet.h
  107. +205 −74 src/mainclient/shell.c
  108. +1 −1 test/amalg/main.c
  109. +68 −13 test/helper.janet
  110. +90 −0 test/suite-array.janet
  111. +63 −0 test/suite-asm.janet
  112. +1,019 −0 test/suite-boot.janet
  113. +183 −0 test/suite-buffer.janet
  114. +127 −0 test/suite-bundle.janet
  115. +44 −0 test/suite-capi.janet
  116. +34 −0 test/suite-cfuns.janet
  117. +77 −0 test/suite-compile.janet
  118. +189 −0 test/suite-corelib.janet
  119. +34 −0 test/suite-debug.janet
  120. +553 −0 test/suite-ev.janet
  121. +58 −0 test/suite-ffi.janet
  122. +204 −0 test/suite-filewatch.janet
  123. +296 −0 test/suite-inttypes.janet
  124. +82 −0 test/suite-io.janet
  125. +225 −0 test/suite-marsh.janet
  126. +69 −0 test/suite-math.janet
  127. +168 −0 test/suite-os.janet
  128. +221 −0 test/suite-parse.janet
  129. +839 −0 test/suite-peg.janet
  130. +65 −0 test/suite-pp.janet
  131. +206 −0 test/suite-specials.janet
  132. +85 −61 test/{suite0002.janet → suite-string.janet}
  133. +13 −28 test/{suite0011.janet → suite-strtod.janet}
  134. +94 −0 test/suite-struct.janet
  135. +42 −0 test/suite-symcache.janet
  136. +72 −0 test/suite-table.janet
  137. +30 −0 test/suite-tuple.janet
  138. +299 −0 test/suite-unknown.janet
  139. +72 −0 test/suite-value.janet
  140. +142 −0 test/suite-vm.janet
  141. +0 −437 test/suite0000.janet
  142. +0 −356 test/suite0001.janet
  143. +0 −496 test/suite0003.janet
  144. +0 −86 test/suite0004.janet
  145. +0 −101 test/suite0005.janet
  146. +0 −264 test/suite0006.janet
  147. +0 −327 test/suite0007.janet
  148. +0 −359 test/suite0008.janet
  149. +0 −278 test/suite0009.janet
  150. +0 −219 test/suite0010.janet
  151. +1 −1 tools/afl/parser_testcases/simple.janet
  152. +1 −1 tools/format.sh
  153. BIN tools/msi/LICENSE.rtf
  154. +7 −0 tools/msi/janet.wxs
  155. +1 −1 tools/symcharsgen.c
  156. +1 −0 tools/tm_lang_gen.janet
  157. +44 −0 tools/update_copyright.janet
3 changes: 2 additions & 1 deletion .builds/freebsd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: freebsd/12.x
image: freebsd/14.x
sources:
- https://git.sr.ht/~bakpakin/janet
packages:
@@ -9,3 +9,4 @@ tasks:
gmake
gmake test
sudo gmake install
sudo gmake uninstall
5 changes: 5 additions & 0 deletions .builds/linux.yml
Original file line number Diff line number Diff line change
@@ -19,3 +19,8 @@ tasks:
ninja
ninja test
sudo ninja install
- meson_min: |
cd janet
meson setup build_meson_min --buildtype=release -Dsingle_threaded=true -Dnanbox=false -Ddynamic_modules=false -Ddocstrings=false -Dnet=false -Dsourcemaps=false -Dpeg=false -Dassembler=false -Dint_types=false -Dreduced_os=true -Dffi=false
cd build_meson_min
ninja
6 changes: 3 additions & 3 deletions .builds/openbsd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: openbsd/latest
image: openbsd/7.4
sources:
- https://git.sr.ht/~bakpakin/janet
packages:
@@ -11,9 +11,10 @@ tasks:
gmake test
doas gmake install
gmake test-install
doas gmake uninstall
- meson_min: |
cd janet
meson setup build_meson_min --buildtype=release -Dsingle_threaded=true -Dnanbox=false -Ddynamic_modules=false -Ddocstrings=false -Dnet=false -Dsourcemaps=false -Dpeg=false -Dassembler=false -Dint_types=false -Dtyped_array=false -Dreduced_os=true
meson setup build_meson_min --buildtype=release -Dsingle_threaded=true -Dnanbox=false -Ddynamic_modules=false -Ddocstrings=false -Dnet=false -Dsourcemaps=false -Dpeg=false -Dassembler=false -Dint_types=false -Dreduced_os=true -Dffi=false
cd build_meson_min
ninja
- meson_prf: |
@@ -29,4 +30,3 @@ tasks:
ninja
ninja test
doas ninja install
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
*.janet linguist-language=Clojure

*.janet linguist-language=Janet
*.janet text eol=lf
*.c text eol=lf
*.h text eol=lf
38 changes: 38 additions & 0 deletions .github/cosmo/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh
set -eux

COSMO_DIR="/sc/cosmocc"

# build x86_64
X86_64_CC="/sc/cosmocc/bin/x86_64-unknown-cosmo-cc"
X86_64_AR="/sc/cosmocc/bin/x86_64-unknown-cosmo-ar"
mkdir -p /sc/cosmocc/x86_64
make -j CC="$X86_64_CC" AR="$X86_64_AR" HAS_SHARED=0 JANET_NO_AMALG=1
cp build/janet /sc/cosmocc/x86_64/janet
make clean

# build aarch64
AARCH64_CC="/sc/cosmocc/bin/aarch64-unknown-cosmo-cc"
AARCH64_AR="/sc/cosmocc/bin/aarch64-unknown-cosmo-ar"
mkdir -p /sc/cosmocc/aarch64
make -j CC="$AARCH64_CC" AR="$AARCH64_AR" HAS_SHARED=0 JANET_NO_AMALG=1
cp build/janet /sc/cosmocc/aarch64/janet
make clean

# fat binary
apefat () {
OUTPUT="$1"
OLDNAME_X86_64="$(basename -- "$2")"
OLDNAME_AARCH64="$(basename -- "$3")"
TARG_FOLD="$(dirname "$OUTPUT")"
"$COSMO_DIR/bin/apelink" -l "$COSMO_DIR/bin/ape-x86_64.elf" \
-l "$COSMO_DIR/bin/ape-aarch64.elf" \
-M "$COSMO_DIR/bin/ape-m1.c" \
-o "$OUTPUT" \
"$2" \
"$3"
cp "$2" "$TARG_FOLD/$OLDNAME_X86_64.x86_64"
cp "$3" "$TARG_FOLD/$OLDNAME_AARCH64.aarch64"
}

apefat /sc/cosmocc/janet.com /sc/cosmocc/x86_64/janet /sc/cosmocc/aarch64/janet
21 changes: 21 additions & 0 deletions .github/cosmo/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
set -e

sudo apt update
sudo apt-get install -y ca-certificates libssl-dev\
qemu qemu-utils qemu-user-static\
texinfo groff\
cmake ninja-build bison zip\
pkg-config build-essential autoconf re2c

# download cosmocc
cd /sc
wget https://github.com/jart/cosmopolitan/releases/download/3.3.3/cosmocc-3.3.3.zip
mkdir -p cosmocc
cd cosmocc
unzip ../cosmocc-3.3.3.zip

# register
cd /sc/cosmocc
sudo cp ./bin/ape-x86_64.elf /usr/bin/ape
sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
42 changes: 42 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "2 7 * * 4"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ cpp ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
tools: linked

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
65 changes: 64 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -5,14 +5,19 @@ on:
tags:
- "v*.*.*"

permissions:
contents: read

jobs:

release:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
name: Build release binaries
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ ubuntu-latest, macos-13 ]
steps:
- name: Checkout the repository
uses: actions/checkout@master
@@ -34,7 +39,38 @@ jobs:
build/c/janet.c
build/c/shell.c
release-arm:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
name: Build release binaries
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest ]
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: Set the version
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Set the platform
run: echo "platform=$(tr '[A-Z]' '[a-z]' <<< $RUNNER_OS)" >> $GITHUB_ENV
- name: Compile the project
run: make clean && make
- name: Build the artifact
run: JANET_DIST_DIR=janet-${{ env.version }}-${{ env.platform }} make build/janet-${{ env.version }}-${{ env.platform }}-aarch64.tar.gz
- name: Draft the release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
build/*.gz
build/janet.h
build/c/janet.c
build/c/shell.c
release-windows:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
name: Build release binaries for windows
runs-on: windows-latest
steps:
@@ -53,3 +89,30 @@ jobs:
./dist/*.zip
./*.zip
./*.msi
release-cosmo:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
name: Build release binaries for Cosmo
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: create build folder
run: |
sudo mkdir -p /sc
sudo chmod -R 0777 /sc
- name: setup Cosmopolitan Libc
run: bash ./.github/cosmo/setup
- name: Set the version
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Set the platform
run: echo "platform=cosmo" >> $GITHUB_ENV
- name: build Janet APE binary
run: bash ./.github/cosmo/build
- name: push binary to github
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
/sc/cosmocc/janet.com
108 changes: 106 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -2,14 +2,17 @@ name: Test

on: [push, pull_request]

permissions:
contents: read

jobs:

test-posix:
name: Build and test on POSIX systems
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ ubuntu-latest, macos-latest, macos-13 ]
steps:
- name: Checkout the repository
uses: actions/checkout@master
@@ -20,7 +23,10 @@ jobs:

test-windows:
name: Build and test on Windows
runs-on: windows-latest
strategy:
matrix:
os: [ windows-latest, windows-2019 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repository
uses: actions/checkout@master
@@ -32,3 +38,101 @@ jobs:
- name: Test the project
shell: cmd
run: build_win test
- name: Test installer build
shell: cmd
run: build_win dist

test-windows-min:
name: Build and test on Windows Minimal build
strategy:
matrix:
os: [ windows-2019 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Python Dependencies
run: pip install meson ninja
- name: Build
shell: cmd
run: |
meson setup build_meson_min --buildtype=release -Dsingle_threaded=true -Dnanbox=false -Ddynamic_modules=false -Ddocstrings=false -Dnet=false -Dsourcemaps=false -Dpeg=false -Dassembler=false -Dint_types=false -Dreduced_os=true -Dffi=false
cd build_meson_min
ninja
test-mingw:
name: Build on Windows with Mingw
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
msystem: [ UCRT64, CLANG64 ]
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: Setup Mingw
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
base-devel
git
gcc
- name: Build
shell: cmd
run: make -j4 CC=gcc
- name: Test
shell: cmd
run: make -j4 CC=gcc test

test-mingw-linux:
name: Build and test with Mingw on Linux + Wine
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: Setup Mingw and wine
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libstdc++6:i386 libgcc-s1:i386
sudo apt-get install gcc-mingw-w64-x86-64-win32 wine wine32 wine64
- name: Compile the project
run: make clean && make CC=x86_64-w64-mingw32-gcc LD=x86_64-w64-mingw32-gcc UNAME=MINGW RUN=wine
- name: Test the project
run: make test UNAME=MINGW RUN=wine VERBOSE=1

test-arm-linux:
name: Build and test ARM32 cross compilation
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: Setup qemu and cross compiler
run: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabi qemu-user
- name: Compile the project
run: make RUN="qemu-arm -L /usr/arm-linux-gnueabi/" CC=arm-linux-gnueabi-gcc LD=arm-linux-gnueabi-gcc
- name: Test the project
run: make RUN="qemu-arm -L /usr/arm-linux-gnueabi/" SUBRUN="qemu-arm -L /usr/arm-linux-gnueabi/" test VERBOSE=1

test-s390x-linux:
name: Build and test s390x in qemu
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@master
- name: Enable qemu
run: docker run --privileged --rm tonistiigi/binfmt --install s390x
- name: Build and run on emulated architecture
run: docker run --rm -v .:/janet --platform linux/s390x alpine sh -c "apk update && apk add --no-interactive git build-base && cd /janet && make -j3 && make test"
Loading