mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-22 10:07:31 +00:00
core, store: merge master into names (#8298)
* core, ui: validate short link type, show contact info for long addresses and rejected contacts (#8184) * tests: short link type, QR code capacity and contact statuses * core: validate the type of short links * android, desktop: show contact info for addresses above QR code capacity * ui: show chats with rejected contact requests * tests: short link types with group, channel and contact data * core: validate short link type against link data * tests: fix short link data test * tests: group data in invitation link before its first use * tests: connect via address in contact profile with group link * core: connect via contact address only with address links * core: parse short link data once, by link type * core: types of short link data parser * core: test short link types and contact rejection, record app fixtures * android, desktop: test contact info, link alerts and rejected contacts * ios: test invalid link alerts and rejected contacts in the chat list * desktop: contact info tests find texts without app resources * ui: core responses of invalid link plans and a rejected contact request * desktop: contact info tests provide the app bar handler * core: normalise file and message keys in app test fixtures * core: normalise deletion times in app test fixtures * desktop: test that a QR code above capacity is not shared on tap * core: test relay link checks and known channel refresh from link data * libs: nodejs 7.1.4 (#8263) * nodejs: live test reads the updated item under the key of 7.1 and 7.2 cores * libs: nodejs 7.1.4 * mcp: session states coloured by what they need, green for working (#8265) * mcp: session states in the colours of what they need: green working, orange waiting in the chat, red idle * mcp: the space after waiting for you in the tests * mcp: a session with a background command shows working in the background * mcp: a readable README, and the roadmap lines of 0.3.0 (#8264) * mcp: readme by what the plugin does for its users, roadmap lines of 0.3.0 * mcp: almost every waiting state * mcp: reply, edit and react in one line * mcp: flat layout without the avatar note * mcp: sessions use flat layout * mcp: shorter lines on answers, the Main group and approvals * mcp: approvals line without the taps * mcp: live stream line * mcp: status line * mcp: shorter lines * mcp: 0.3.1 with simplex-chat 7.1.4 (#8266) * docs: testing approaches of the codebase (#8255) * docs: app changes come with app tests on the core's recorded responses (#8252) * ci: decide the library claim from the written releases (#8137) * ci: test the library claim when reads return the previous releases * ci: decide the library claim from the written releases * tests: record name fixtures after the channel join settles (#8250) * core, ci: update sqlcipher-simple to 0.4.19.0 and simplexmq (#8270) * update sqlcipher-simple to 0.4.19.0 * sqlcipher-simple from simplex-chat/sqlcipher-simple * update simplexmq * ci: restore source repositories only for the same cabal.project * ci: keep restored source checkouts only at their pinned commits * android, desktop, ios: copy markdown files with line breaks, and the whole file with one button (#8269) * android, desktop: test copying lines from the markdown text view * android, desktop: keep line breaks in text copied from markdown files * android, desktop: check the last copied text in the markdown view test * android, desktop, ios: button to copy the whole markdown file * android, desktop: test the markdown file copy button * android, desktop, ios: ask before copying markdown files over 128 KB * android, desktop, ios: title the markdown copy alerts File too large * ios: test the markdown file copy button * android, desktop, ios: preview the markdown file view and test the copy limit * android, desktop, ios: snapshot references of the markdown file view * docs: names conditions describe upgradeable registry contracts (#8277) * docs: names conditions describe upgradeable registry contracts * docs: names conditions without the immutability after stabilization --------- Co-authored-by: brenzi-agent <346870783+brenzi-agent@users.noreply.github.com> * ci: reproducible Linux builds of 7.1 releases (#8276) * ci: plan reproducible Linux builds of 7.1 releases * ci: reproduce Linux builds with the cabal store path of releases * ci: reproduce releases with the current reproduce script * ci: build in the image with the cabal directory of releases * ci: reproduce releases on the Ubuntu 24.04 runner * ci: correct the failure history and rollout in the plan --------- Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com> * website: remove the webinar promotion (#8281) * website: remove the webinar invitation from the home page * website: redirect the livestream page to Wefunder * mcp server: recall the chat history in a new agent session (#8141) * mcp server: recall the chat history in a new agent session * docs: chat history in receive for a new agent session * mcp server: type the history page for the compiler * mcp server: recall the chat history after a compaction too * docs: history plan changes with the message helpers of master Claude-Session: https://claude.ai/code/session_01AV2VpomCCQNciqggT9gr75 * docs: drop anchor remapping from the docs table of the history plan Claude-Session: https://claude.ai/code/session_01AV2VpomCCQNciqggT9gr75 --------- Co-authored-by: brenzi-agent <346870783+brenzi-agent@users.noreply.github.com> * core: prevent stalled join of channel subscribers to a new relay (#8239) * core: save relay connection before requesting relay link data * core: share relay connection creation between join and retry * tests: connect to a re-added relay when its connection is saved late * tests: delay only the relay connection record, not the command * ci, tests: run all tests in CI (#8238) * bots, tests: run broadcast bot test in CI * tests: test moderation that arrives before the message * ci, tests: run all tests in CI * tests: update re-enabled tests, restore query plans, PostgreSQL schema from CI * tests: remove CI skip helpers no longer used * tests: expect XFTP AUTH error of cancelled standalone file * tests: update query plans from CI * tests: update query plans from CI * tests: expect group history and member contacts in async group test * tests: accept subscription summary after first events on restart * tests: make AUTH and client timeout direct tests deterministic * tests: keep bob's badge clock before renewal until the move back * tests: keep the quota of 2 messages only on the member's receive queue * tests: keep query plans files with repeated entries of one query * tests: update query plans from CI * tests: stop the host before a member requests to join with a badge * tests: remove repeated entries of one query from query plans files * tests: accept the refusal of an unknown remote host after its session code * ci: state when the query plans test fails * tests: skip multicast discovery on macOS CI runners * tests: accept a remote host started with one local address * tests: restore the client timeout test except its zero timeout * tests: fail when a remote host prints another line than its other addresses * ci: name the tests that overwrite generated files * tests: move the badge clock after the restoring device arms its wake * tests: keep both members on the quota server in the member inactivity test * tests: accept subscription summaries in any order in the async group test * tests: update query plans from CI * tests: quota of 2 only on bob's queues in member inactivity test * tests: connect to a deleted link after its queue is deleted * core: save relay connection before requesting relay link data * core: share relay connection creation between join and retry * tests: connect to a re-added relay when its connection is saved late * tests: delay only the relay connection record, not the command * tests: record API fixtures on SQLite only * core: update query plans * ci: run PostgreSQL tests with the steps of build-linux * desktop: prevent crash on Linux with bitmap and WOFF2 fallback fonts (#8288) * desktop: prevent crash on Linux with bitmap and WOFF2 fallback fonts * desktop: record time offsets and snapshots rendered with Skia m138 * desktop: name the time offset test, skip only a missing fc-cache, update plan --------- Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com> * core, directory: stop cancelled actions instead of continuing them (#8279) * ci: retry npm install once after a failure (#8280) * core: query plans of the store group tests that master now verifies --------- Co-authored-by: brenzi-agent <346870783+brenzi-agent@users.noreply.github.com> Co-authored-by: sh-agents <justcheckingifitwillwork@gmail.com> Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com> Co-authored-by: brenzi-agent <brenzi-agent@brenzi.ch> Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
166 files changed
+2609
-445
No files matched your search
+111
-9
@@ -276,7 +276,7 @@ jobs:
|
||||
image_cache: ghcr.io/${{ github.repository_owner }}/simplex-chat-build-cache:${{ matrix.os }}-${{ matrix.arch }}-ghc${{ matrix.ghc }}
|
||||
source_hashes: dist-newstyle/sources.sha256
|
||||
concurrency: &linux-concurrency
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-linux-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ghc }}-${{ needs.maybe-release.outputs.libs_tag }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-linux-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.ghc }}${{ matrix.postgres && '-postgres' || '' }}-${{ needs.maybe-release.outputs.libs_tag }}
|
||||
cancel-in-progress: ${{ github.event_name != 'push' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -378,7 +378,7 @@ jobs:
|
||||
toolchain=$(docker exec builder dpkg-query -W -f '${db:Status-Status} ${binary:Package} ${Version}\n' 'binutils*' 'cpp*' 'gcc*' '*-dev' | grep '^installed ' | sha256sum | cut -c1-16)
|
||||
target=ubuntu-${{ matrix.os }}-${{ matrix.arch }}-ghc${{ matrix.ghc }}-$toolchain
|
||||
echo "deps=deps-$target" >> "$GITHUB_OUTPUT"
|
||||
echo "dist=dist-$target" >> "$GITHUB_OUTPUT"
|
||||
echo "dist=${{ env.dist_name || 'dist' }}-$target" >> "$GITHUB_OUTPUT"
|
||||
echo "dist_lib=dist-lib-$target" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Restore dependencies from cache
|
||||
@@ -474,14 +474,14 @@ jobs:
|
||||
run: |
|
||||
scripts/ci/prune-old-builds.sh dist-newstyle
|
||||
cabal update
|
||||
cabal build -j --enable-tests ${{ env.ghc_options }}
|
||||
cabal build -j --enable-tests ${{ env.ghc_options }} ${{ env.cabal_targets }}
|
||||
mkdir -p /out
|
||||
for i in simplex-chat simplex-chat-test; do
|
||||
for i in ${{ env.bins || 'simplex-chat simplex-chat-test' }}; do
|
||||
bin=$(find /project/dist-newstyle -name "$i" -type f -executable)
|
||||
chmod +x "$bin"
|
||||
cp "$bin" /out/
|
||||
done
|
||||
strip /out/simplex-chat
|
||||
[ ! -f /out/simplex-chat ] || strip /out/simplex-chat
|
||||
|
||||
# Also for pull requests that change the chat core, for the package tests.
|
||||
- name: Build library
|
||||
@@ -658,6 +658,36 @@ jobs:
|
||||
github_ref: ${{ github.ref }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup Node.js for tests
|
||||
if: matrix.should_run == true && matrix.arch == 'x86_64'
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Build badge web app for tests
|
||||
if: matrix.should_run == true && matrix.arch == 'x86_64'
|
||||
working-directory: apps/simplex-store-service/web
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Install PostgreSQL 15 client tools
|
||||
if: matrix.postgres == true
|
||||
shell: bash
|
||||
run: |
|
||||
sudo install -d /usr/share/postgresql-common/pgdg
|
||||
sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
|
||||
sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
||||
sudo apt update
|
||||
sudo apt -y install postgresql-client-15
|
||||
|
||||
- name: Start PostgreSQL
|
||||
if: matrix.postgres == true
|
||||
shell: bash
|
||||
run: |
|
||||
docker run -d --name postgres -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:15 -c max_connections=3000 -c fsync=off
|
||||
timeout 60 sh -c 'until pg_isready -h localhost; do sleep 1; done'
|
||||
|
||||
- name: Mount RAM disk for tests
|
||||
if: matrix.should_run == true && matrix.arch == 'x86_64'
|
||||
shell: bash
|
||||
@@ -667,6 +697,7 @@ jobs:
|
||||
sudo chown $(id -u):$(id -g) tests/tmp
|
||||
|
||||
- name: Run tests
|
||||
id: tests
|
||||
if: matrix.should_run == true && matrix.arch == 'x86_64'
|
||||
timeout-minutes: 120
|
||||
shell: bash
|
||||
@@ -675,7 +706,22 @@ jobs:
|
||||
TESTS: ${{ github.event_name == 'workflow_dispatch' && inputs.tests || '' }}
|
||||
PR_BODY: ${{ github.event.pull_request.draft == true && github.event.pull_request.body || '' }}
|
||||
ATTEMPTS: ${{ (github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/tags/v')) && 3 || 1 }}
|
||||
run: scripts/ci/run-tests.sh timeout 35m ./simplex-chat-test
|
||||
run: scripts/ci/run-tests.sh timeout ${{ env.test_timeout || '35m' }} ./simplex-chat-test
|
||||
|
||||
- name: Check generated files
|
||||
id: generated
|
||||
if: ${{ !cancelled() && steps.tests.outcome != 'skipped' }}
|
||||
shell: bash
|
||||
run: |
|
||||
git diff > "$RUNNER_TEMP/generated-files.patch"
|
||||
git diff --stat --exit-code
|
||||
|
||||
- name: Upload generated files
|
||||
if: ${{ !cancelled() && steps.generated.outcome == 'failure' }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: generated-files-ubuntu-${{ matrix.os }}-ghc${{ matrix.ghc }}${{ matrix.postgres && '-postgres' || '' }}
|
||||
path: ${{ runner.temp }}/generated-files.patch
|
||||
|
||||
# Compiling the desktop and Android targets of :common in parallel exceeds the 2 GB Kotlin daemon heap.
|
||||
# cmakeBuildAndCopy links the JNI library against libsimplex, which this job does not build.
|
||||
@@ -1169,6 +1215,46 @@ jobs:
|
||||
test=$(cabal list-bin --constraint 'simplexmq +client_postgres' --constraint 'simplex-chat +client_postgres' simplex-chat-test | tail -n 1)
|
||||
"$test" --fail-on=empty -m "Supporter badges" -m "SimpleX store service" -m "StoreService names"
|
||||
|
||||
# =================================
|
||||
# Linux PostgreSQL Tests
|
||||
# =================================
|
||||
|
||||
test-postgres:
|
||||
name: "ubuntu-${{ matrix.os }}-${{ matrix.arch }} (PostgreSQL tests), GHC: ${{ matrix.ghc }}"
|
||||
needs: [maybe-release, variables]
|
||||
if: needs.maybe-release.outputs.haskell == 'true' && !(github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/tags/v'))
|
||||
runs-on: ${{ matrix.runner }}
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
env:
|
||||
image_cache: ghcr.io/${{ github.repository_owner }}/simplex-chat-build-cache:${{ matrix.os }}-${{ matrix.arch }}-ghc${{ matrix.ghc }}
|
||||
source_hashes: dist-newstyle/sources.sha256
|
||||
opt: O0
|
||||
ghc_options: --ghc-options=-O0
|
||||
cache_o0: false
|
||||
cabal_targets: --constraint 'simplexmq +client_postgres' --constraint 'simplex-chat +client_postgres' test:simplex-chat-test
|
||||
bins: simplex-chat-test
|
||||
dist_name: dist-postgres
|
||||
test_timeout: 60m
|
||||
PGHOST: localhost
|
||||
ALLOW_EMPTY: true
|
||||
concurrency: *linux-concurrency
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: 22.04
|
||||
os_underscore: 22_04
|
||||
arch: x86_64
|
||||
runner: "ubuntu-22.04"
|
||||
should_run: true
|
||||
ghc: ${{ needs.variables.outputs.GHC_VER }}
|
||||
hash: 'sha256:5c8b2c0a6c745bc177669abfaa716b4bc57d58e2ea3882fb5da67f4d59e3dda5'
|
||||
kotlin: false
|
||||
postgres: true
|
||||
steps: *linux-steps
|
||||
|
||||
# =========================
|
||||
# MacOS Build
|
||||
# =========================
|
||||
@@ -1420,6 +1506,7 @@ jobs:
|
||||
ln -s /Volumes/tests tests/tmp
|
||||
|
||||
- name: Run tests
|
||||
id: tests
|
||||
if: matrix.should_run == true && matrix.arch == 'aarch64'
|
||||
timeout-minutes: 120
|
||||
shell: bash
|
||||
@@ -1441,6 +1528,21 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check generated files
|
||||
id: generated
|
||||
if: ${{ !cancelled() && steps.tests.outcome != 'skipped' }}
|
||||
shell: bash
|
||||
run: |
|
||||
git diff > "$RUNNER_TEMP/generated-files.patch"
|
||||
git diff --stat --exit-code
|
||||
|
||||
- name: Upload generated files
|
||||
if: ${{ !cancelled() && steps.generated.outcome == 'failure' }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: generated-files-${{ matrix.os }}
|
||||
path: ${{ runner.temp }}/generated-files.patch
|
||||
|
||||
- name: Build library
|
||||
id: mac_lib_build
|
||||
if: ${{ !cancelled() && matrix.should_run == true && needs.maybe-release.outputs.libs_tag && steps.mac_cli_build.outcome == 'success' }}
|
||||
@@ -2024,8 +2126,8 @@ jobs:
|
||||
if: steps.plan.outputs.nodejs_version
|
||||
working-directory: packages/simplex-chat-nodejs
|
||||
run: |
|
||||
(cd ../simplex-chat-client/types/typescript && npm install --no-audit --no-fund && npx tsc)
|
||||
npm install --ignore-scripts --no-save --no-audit --no-fund ../simplex-chat-client/types/typescript
|
||||
(cd ../simplex-chat-client/types/typescript && "$GITHUB_WORKSPACE/scripts/ci/npm-install.sh" && npx tsc)
|
||||
"$GITHUB_WORKSPACE/scripts/ci/npm-install.sh" --ignore-scripts --no-save ../simplex-chat-client/types/typescript
|
||||
npx tsc && cp src/simplex.* dist
|
||||
npx jest tests/libs.test.ts tests/api.unit.test.ts
|
||||
|
||||
@@ -2041,7 +2143,7 @@ jobs:
|
||||
VERSION: ${{ steps.plan.outputs.types_version }}
|
||||
DIST_TAG: ${{ steps.plan.outputs.types_dist_tag }}
|
||||
run: |
|
||||
npm install --no-audit --no-fund
|
||||
"$GITHUB_WORKSPACE/scripts/ci/npm-install.sh"
|
||||
npm publish --provenance --access public --tag "$DIST_TAG"
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
reproduce:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Get latest release
|
||||
shell: bash
|
||||
@@ -22,9 +22,6 @@ jobs:
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.TAG }}
|
||||
repository: simplex-chat/simplex-chat
|
||||
|
||||
# Otherwise we run out of disk space with Docker build
|
||||
- name: Free disk space
|
||||
|
||||
@@ -28,6 +28,10 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: website
|
||||
run: ../scripts/ci/npm-install.sh
|
||||
|
||||
- name: Install dependencies & build
|
||||
run: |
|
||||
./website/web.sh
|
||||
|
||||
Reference in new issue
Block a user