Compare commits

..
7 changed files with 51 additions and 83 deletions

No files matched your search

@@ -54,7 +54,7 @@ runs:
run: mv /tmp/binaries/sbin/conduwuit /tmp/binaries/conduwuit${{ inputs.cpu_suffix }}-${{ inputs.slug }}${{ inputs.artifact_suffix }} run: mv /tmp/binaries/sbin/conduwuit /tmp/binaries/conduwuit${{ inputs.cpu_suffix }}-${{ inputs.slug }}${{ inputs.artifact_suffix }}
- name: Upload binary artifact - name: Upload binary artifact
uses: forgejo/upload-artifact@v3 uses: forgejo/upload-artifact@v4
with: with:
name: conduwuit${{ inputs.cpu_suffix }}-${{ inputs.slug }}${{ inputs.artifact_suffix }} name: conduwuit${{ inputs.cpu_suffix }}-${{ inputs.slug }}${{ inputs.artifact_suffix }}
path: /tmp/binaries/conduwuit${{ inputs.cpu_suffix }}-${{ inputs.slug }}${{ inputs.artifact_suffix }} path: /tmp/binaries/conduwuit${{ inputs.cpu_suffix }}-${{ inputs.slug }}${{ inputs.artifact_suffix }}
@@ -62,7 +62,7 @@ runs:
- name: Upload digest - name: Upload digest
if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }} if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }}
uses: forgejo/upload-artifact@v3 uses: forgejo/upload-artifact@v4
with: with:
name: digests${{ inputs.digest_suffix }}-${{ inputs.slug }}${{ inputs.cpu_suffix }} name: digests${{ inputs.digest_suffix }}-${{ inputs.slug }}${{ inputs.cpu_suffix }}
path: /tmp/digests/* path: /tmp/digests/*
+1 -1
View File
@@ -126,7 +126,7 @@ jobs:
[ -f /etc/conduwuit/conduwuit.toml ] && echo "✅ Config file installed" [ -f /etc/conduwuit/conduwuit.toml ] && echo "✅ Config file installed"
- name: Upload deb artifact - name: Upload deb artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v5
with: with:
name: continuwuity-${{ steps.debian-version.outputs.distribution }} name: continuwuity-${{ steps.debian-version.outputs.distribution }}
path: ${{ steps.cargo-deb.outputs.path }} path: ${{ steps.cargo-deb.outputs.path }}
+2 -2
View File
@@ -238,13 +238,13 @@ jobs:
cp $BIN_RPM upload-bin/ cp $BIN_RPM upload-bin/
- name: Upload binary RPM - name: Upload binary RPM
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v5
with: with:
name: continuwuity name: continuwuity
path: upload-bin/ path: upload-bin/
- name: Upload debug RPM artifact - name: Upload debug RPM artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v5
with: with:
name: continuwuity-debug name: continuwuity-debug
path: artifacts/*debuginfo*.rpm path: artifacts/*debuginfo*.rpm
+1 -1
View File
@@ -109,7 +109,7 @@ jobs:
cat ./element-web/webapp/config.json cat ./element-web/webapp/config.json
- name: 📤 Upload Artifact - name: 📤 Upload Artifact
uses: forgejo/upload-artifact@v3 uses: forgejo/upload-artifact@v4
with: with:
name: element-web name: element-web
path: ./element-web/webapp/ path: ./element-web/webapp/
+2 -5
View File
@@ -586,13 +586,10 @@
#allow_unstable_room_versions = true #allow_unstable_room_versions = true
# Default room version continuwuity will create rooms with. # Default room version continuwuity will create rooms with.
# Note that this has to be a string since the room version is a string
# rather than an integer. Forgetting the quotes will make the server fail
# to start!
# #
# Per spec, room version "11" is the default. # Per spec, room version 11 is the default.
# #
#default_room_version = "11" #default_room_version = 11
# Enable OpenTelemetry OTLP tracing export. This replaces the deprecated # Enable OpenTelemetry OTLP tracing export. This replaces the deprecated
# Jaeger exporter. Traces will be sent via OTLP to a collector (such as # Jaeger exporter. Traces will be sent via OTLP to a collector (such as
+41 -67
View File
@@ -6,10 +6,43 @@
pkgs, pkgs,
... ...
}: }:
let {
baseTestScript = # run some nixos tests as checks
pkgs.writers.writePython3Bin "do_test" { libraries = [ pkgs.python3Packages.matrix-nio ]; } checks = lib.pipe self'.packages [
'' # we take all packages (names)
builtins.attrNames
# we filter out all packages that end with `-bin` (which we are interested in for testing)
(builtins.filter (lib.hasSuffix "-bin"))
# for each of these binaries we built the basic nixos test
#
# this test was initially yoinked from
#
# https://github.com/NixOS/nixpkgs/blob/960ce26339661b1b69c6f12b9063ca51b688615f/nixos/tests/matrix/continuwuity.nix
(builtins.map (name: {
name = "test-${name}";
value = pkgs.testers.runNixOSTest {
inherit name;
nodes = {
continuwuity = {
services.matrix-continuwuity = {
enable = true;
package = self'.packages.${name};
settings.global = {
server_name = name;
address = [ "0.0.0.0" ];
allow_registration = true;
yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse = true;
};
extraEnvironment.RUST_BACKTRACE = "yes";
};
networking.firewall.allowedTCPPorts = [ 6167 ];
};
client =
{ pkgs, ... }:
{
environment.systemPackages = [
(pkgs.writers.writePython3Bin "do_test" { libraries = [ pkgs.python3Packages.matrix-nio ]; } ''
import asyncio import asyncio
import nio import nio
@@ -67,41 +100,9 @@
if __name__ == "__main__": if __name__ == "__main__":
asyncio.run(main()) asyncio.run(main())
''; '')
in ];
{
# run some nixos tests as checks
checks = lib.pipe self'.packages [
# we take all packages (names)
builtins.attrNames
# we filter out all packages that end with `-bin` (which we are interested in for testing)
(builtins.filter (lib.hasSuffix "-bin"))
# for each of these binaries we built the basic nixos test
#
# this test was initially yoinked from
#
# https://github.com/NixOS/nixpkgs/blob/960ce26339661b1b69c6f12b9063ca51b688615f/nixos/tests/matrix/continuwuity.nix
(builtins.concatMap (
name:
builtins.map
(
{ config, suffix }:
{
name = "test-${name}-${suffix}";
value = pkgs.testers.runNixOSTest {
inherit name;
nodes = {
continuwuity = {
services.matrix-continuwuity = {
enable = true;
package = self'.packages.${name};
settings = config;
extraEnvironment.RUST_BACKTRACE = "yes";
}; };
networking.firewall.allowedTCPPorts = [ 6167 ];
};
client.environment.systemPackages = [ baseTestScript ];
}; };
testScript = '' testScript = ''
@@ -112,38 +113,11 @@
continuwuity.wait_for_open_port(6167) continuwuity.wait_for_open_port(6167)
with subtest("ensure messages can be exchanged"): with subtest("ensure messages can be exchanged"):
client.succeed("${lib.getExe baseTestScript} >&2") client.succeed("do_test >&2")
''; '';
}; };
} }))
)
[
{
suffix = "base";
config = {
global = {
server_name = name;
address = [ "0.0.0.0" ];
allow_registration = true;
yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse = true;
};
};
}
{
suffix = "with-room-version";
config = {
global = {
server_name = name;
address = [ "0.0.0.0" ];
allow_registration = true;
yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse = true;
default_room_version = "12";
};
};
}
]
))
builtins.listToAttrs builtins.listToAttrs
]; ];
}; };
+2 -5
View File
@@ -703,13 +703,10 @@ pub struct Config {
pub allow_unstable_room_versions: bool, pub allow_unstable_room_versions: bool,
/// Default room version continuwuity will create rooms with. /// Default room version continuwuity will create rooms with.
/// Note that this has to be a string since the room version is a string
/// rather than an integer. Forgetting the quotes will make the server fail
/// to start!
/// ///
/// Per spec, room version "11" is the default. /// Per spec, room version 11 is the default.
/// ///
/// default: "11" /// default: 11
#[serde(default = "default_default_room_version")] #[serde(default = "default_default_room_version")]
pub default_room_version: RoomVersionId, pub default_room_version: RoomVersionId,