Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to mozjs115 #122

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 76 additions & 30 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2017 Claudio André <claudioandre.br@gmail.com>
---
include:
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/c5626190ec14b475271288dda7a7dae8dbe0cd76/templates/alpine.yml'
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/b791bd48996e3ced9ca13f1c5ee82be8540b8adb/templates/alpine.yml'

stages:
- prepare
Expand All @@ -14,7 +14,7 @@ stages:

.gjs-alpine:
variables:
FDO_DISTRIBUTION_TAG: '2022-07-23.0'
FDO_DISTRIBUTION_TAG: '2022-11-02.0'
FDO_UPSTREAM_REPO: GNOME/gjs

build-alpine-image:
Expand All @@ -23,15 +23,15 @@ build-alpine-image:
- .gjs-alpine
stage: prepare
variables:
FDO_DISTRIBUTION_PACKAGES: cppcheck git python3 yarn bash grep
FDO_DISTRIBUTION_PACKAGES: cppcheck git python3 npm bash grep
FDO_DISTRIBUTION_EXEC: |
python3 -m ensurepip &&
rm -r /usr/lib/python*/ensurepip &&
pip3 install --no-cache --upgrade cpplint reuse codespell &&
mkdir -p /cwd

.coverage: &coverage
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
variables:
coverage: '/^ lines.*(\d+\.\d+\%)/'
script:
Expand Down Expand Up @@ -62,7 +62,6 @@ build-alpine-image:
paths:
- _build/compile_commands.json
- _build/meson-logs/*log*.txt
- scripts.log
script:
- test/test-ci.sh SETUP
- test/test-ci.sh BUILD
Expand All @@ -75,7 +74,7 @@ build-alpine-image:
build_recommended:
<<: *build
stage: source_check
image: registry.gitlab.gnome.org/gnome/gjs:job-2190518_fedora.mozjs102-debug # pinned on purpose
image: registry.gitlab.gnome.org/gnome/gjs:job-3012153_fedora.mozjs115-debug # pinned on purpose
variables:
TEST_OPTS: --verbose --no-stdsplit --print-errorlogs --setup=verbose
except:
Expand All @@ -86,10 +85,13 @@ sanitizer_gcc:
stage: test
tags:
- asan # LSAN needs CAP_SYS_PTRACE
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
variables:
CONFIG_OPTS: -Db_sanitize=address,undefined
TEST_OPTS: --timeout-multiplier=3 --setup=verbose
TEST_OPTS: --timeout-multiplier=3
# Override these during build, but they are overridden by meson anyways
ASAN_OPTIONS: start_deactivated=true,detect_leaks=0
USE_UNSTABLE_GNOME_PREFIX: 'true'
except:
- schedules

Expand All @@ -100,36 +102,48 @@ sanitizer_thread_gcc:
allow_failure: true
tags:
- asan # TSAN needs CAP_SYS_PTRACE
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
variables:
CONFIG_OPTS: -Db_sanitize=thread
TEST_OPTS: --timeout-multiplier=3 --setup=verbose
USE_UNSTABLE_GNOME_PREFIX: 'true'
except:
- schedules

# There are a lot of debug log statements that are ifdef'd out in normal usage.
# These sometimes get invalid expressions in them, leading to annoyance the
# next time you try to use debug logging.
build_maximal:
<<: *build
when: on_success
stage: test
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
variables:
CC: clang
CXX: clang++
CONFIG_OPTS: -Ddtrace=true -Dsystemtap=true -Dverbose_logs=true
USE_UNSTABLE_GNOME_PREFIX: 'true'
CONFIG_OPTS: >-
-Ddtrace=true -Dsystemtap=true -Dverbose_logs=true -Db_pch=false
ENABLE_GTK: "yes"
except:
- schedules
script:
- test/test-ci.sh SETUP
- test/test-ci.sh BUILD
- test/test-ci.sh SH_CHECKS
artifacts:
reports:
junit: _build/meson-logs/testlog*.junit.xml
name: log
when: always
paths:
- _build/compile_commands.json
- _build/meson-logs/*log*.txt
- scripts.log

build_minimal:
<<: *build
stage: test
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115
variables:
CONFIG_OPTS: >-
-Dbuildtype=release
Expand All @@ -141,7 +155,7 @@ build_minimal:
build_unity:
<<: *build
stage: test
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115
variables:
# unity-size here is forced to use an high number to check whether we can
# join all the sources together, but should not be used in real world to
Expand Down Expand Up @@ -201,6 +215,12 @@ cppcheck:
- tags
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip cppcheck\]/
only:
changes:
- "**/*.c"
- "**/*.cpp"
- "**/*.h"
- "**/*.hh"

cpplint:
when: on_success
Expand All @@ -217,6 +237,11 @@ cpplint:
- tags
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip cpplint\]/
only:
changes:
- "**/*.cpp"
- "**/*.h"
- "**/*.hh"

eslint:
when: on_success
Expand All @@ -233,6 +258,12 @@ eslint:
- tags
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip eslint\]/
only:
changes:
- "**/*.js"
- .eslintignore
- .eslintrc.yml
- '**/.eslintrc.yml'

pch_check:
when: on_success
Expand All @@ -249,11 +280,18 @@ pch_check:
- tags
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip pch_check\]/
only:
changes:
- "**/*.c"
- "**/*.cpp"
- "**/*.h"
- "**/*.hh"
- test/check-pch.sh

iwyu:
when: on_success
stage: source_check
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
script:
- test/test-ci.sh UPSTREAM_BASE
- meson setup _build -Db_pch=false
Expand All @@ -274,7 +312,11 @@ codespell:
stage: source_check
script:
- codespell --version
- codespell -S "*.png,*.po,*.jpg,*.wrap,.git,LICENSES" -f --builtin "code,usage,clear" --skip="./installed-tests/js/jasmine.js,./README.md,./build/flatpak/*.json" --ignore-words-list="afterall,befores,files',filetest,gir,inout,stdio,uint,upto,xdescribe"
- |
codespell -S "*.png,*.po,*.jpg,*.wrap,.git,LICENSES" -f \
--builtin "code,usage,clear" \
--skip="./build/maintainer-upload-release.sh,./installed-tests/js/jasmine.js,./README.md,./build/flatpak/*.json,./tools/package-lock.json" \
--ignore-words-list="afterall,deque,falsy,files',filetest,gir,inout,musl,nmake,stdio,uint,upto,xdescribe"
except:
- schedules

Expand Down Expand Up @@ -304,7 +346,7 @@ coverage:
iwyu-full:
when: manual
stage: manual
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
script:
- meson setup _build
- ./tools/run_iwyu.sh
Expand All @@ -316,10 +358,13 @@ sanitizer_clang:
stage: manual
tags:
- asan # LSAN needs CAP_SYS_PTRACE
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
variables:
CC: clang
CXX: clang++
USE_UNSTABLE_GNOME_PREFIX: 'true'
# Override these during build, but they are overridden by meson anyways
ASAN_OPTIONS: start_deactivated=true,detect_leaks=0
CONFIG_OPTS: -Db_sanitize=address,undefined -Db_lundef=false
TEST_OPTS: --timeout-multiplier=3 --setup=verbose
when: manual
Expand All @@ -329,7 +374,7 @@ sanitizer_clang:
installed_tests:
<<: *build
stage: manual
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
variables:
CONFIG_OPTS: -Dinstalled_tests=true -Dprefix=/usr
TEST: skip
Expand All @@ -345,8 +390,9 @@ installed_tests:
valgrind:
<<: *build
stage: manual
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
variables:
USE_UNSTABLE_GNOME_PREFIX: 'true'
TEST_OPTS: --setup=valgrind
allow_failure: true
when: manual
Expand All @@ -357,7 +403,7 @@ valgrind:
zeal_2:
<<: *build
stage: manual
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
variables:
TEST_OPTS: --setup=extra_gc
when: manual
Expand All @@ -367,7 +413,7 @@ zeal_2:
zeal_4:
<<: *build
stage: manual
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
variables:
TEST_OPTS: --setup=pre_verify
when: manual
Expand All @@ -377,7 +423,7 @@ zeal_4:
zeal_11:
<<: *build
stage: manual
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs102-debug
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs115-debug
variables:
TEST_OPTS: --setup=post_verify
when: manual
Expand All @@ -388,7 +434,7 @@ zeal_11:
# Create CI Docker Images #
#############################################
.Docker image template: &create_docker_image
image: quay.io/freedesktop.org/ci-templates:container-build-base-2022-05-25.0
image: quay.io/freedesktop.org/ci-templates:container-build-base-2023-06-27.1
stage: deploy
only:
variables:
Expand Down Expand Up @@ -419,28 +465,28 @@ zeal_11:
BUILDAH_FORMAT: docker
BUILDAH_ISOLATION: chroot

fedora.mozjs91:
fedora.mozjs102:
<<: *create_docker_image
variables:
<<: *docker_variables
DOCKERFILE: test/extra/Dockerfile

fedora.mozjs91-debug:
fedora.mozjs102-debug:
<<: *create_docker_image
variables:
<<: *docker_variables
DOCKERFILE: test/extra/Dockerfile.debug

fedora.mozjs102:
fedora.mozjs115:
<<: *create_docker_image
variables:
<<: *docker_variables
DOCKERFILE: test/extra/Dockerfile
ARGS: --build-arg MOZJS_BRANCH=mozjs102 --build-arg MOZJS_BUILDDEPS=mozjs91
ARGS: --build-arg MOZJS_BRANCH=mozjs115 --build-arg MOZJS_BUILDDEPS=mozjs102

fedora.mozjs102-debug:
fedora.mozjs115-debug:
<<: *create_docker_image
variables:
<<: *docker_variables
DOCKERFILE: test/extra/Dockerfile.debug
ARGS: --build-arg MOZJS_BRANCH=mozjs102 --build-arg MOZJS_BUILDDEPS=mozjs91
ARGS: --build-arg MOZJS_BRANCH=mozjs115 --build-arg MOZJS_BUILDDEPS=mozjs102
Loading
Loading