summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ports_unix.yml14
-rw-r--r--ports/unix/variants/longlong/mpconfigvariant.h37
-rw-r--r--ports/unix/variants/longlong/mpconfigvariant.mk8
-rwxr-xr-xtools/ci.sh8
4 files changed, 67 insertions, 0 deletions
diff --git a/.github/workflows/ports_unix.yml b/.github/workflows/ports_unix.yml
index 4b22926ea..60c0244a8 100644
--- a/.github/workflows/ports_unix.yml
+++ b/.github/workflows/ports_unix.yml
@@ -134,6 +134,20 @@ jobs:
if: failure()
run: tests/run-tests.py --print-failures
+ longlong:
+ runs-on: ubuntu-22.04 # use 22.04 to get python2, and libffi-dev:i386
+ steps:
+ - uses: actions/checkout@v4
+ - name: Install packages
+ run: source tools/ci.sh && ci_unix_32bit_setup
+ - name: Build
+ run: source tools/ci.sh && ci_unix_longlong_build
+ - name: Run main test suite
+ run: source tools/ci.sh && ci_unix_longlong_run_tests
+ - name: Print failures
+ if: failure()
+ run: tests/run-tests.py --print-failures
+
float:
runs-on: ubuntu-latest
steps:
diff --git a/ports/unix/variants/longlong/mpconfigvariant.h b/ports/unix/variants/longlong/mpconfigvariant.h
new file mode 100644
index 000000000..20c52e98f
--- /dev/null
+++ b/ports/unix/variants/longlong/mpconfigvariant.h
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2016 Damien P. George
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+// This config exists to test that the MICROPY_LONGINT_IMPL_LONGLONG variant
+// (i.e. minimal form of "big integer" that's backed by 64-bit int only) builds
+// and passes tests.
+
+#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG)
+
+// Set base feature level.
+#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES)
+
+// Enable extra Unix features.
+#include "../mpconfigvariant_common.h"
diff --git a/ports/unix/variants/longlong/mpconfigvariant.mk b/ports/unix/variants/longlong/mpconfigvariant.mk
new file mode 100644
index 000000000..2d2c37064
--- /dev/null
+++ b/ports/unix/variants/longlong/mpconfigvariant.mk
@@ -0,0 +1,8 @@
+# build interpreter with "bigints" implemented as "longlong"
+
+# otherwise, small int is essentially 64-bit
+MICROPY_FORCE_32BIT := 1
+
+MICROPY_PY_FFI := 0
+
+MPY_TOOL_FLAGS = -mlongint-impl longlong
diff --git a/tools/ci.sh b/tools/ci.sh
index 518eb7449..564b7810f 100755
--- a/tools/ci.sh
+++ b/tools/ci.sh
@@ -695,6 +695,14 @@ function ci_unix_nanbox_run_tests {
ci_unix_run_tests_full_no_native_helper nanbox PYTHON=python2.7
}
+function ci_unix_longlong_build {
+ ci_unix_build_helper VARIANT=longlong
+}
+
+function ci_unix_longlong_run_tests {
+ ci_unix_run_tests_full_helper longlong
+}
+
function ci_unix_float_build {
ci_unix_build_helper VARIANT=standard CFLAGS_EXTRA="-DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_FLOAT"
ci_unix_build_ffi_lib_helper gcc