Compare commits

..

2 Commits

Author SHA1 Message Date
Christopher James Halse Rogers adb5dac1d2 snap: Fix build process for Tier 2 platforms
Unfortunately this only actually *fixes* the build for arm64;
it seems that we hit various bugs in Rust on ppc64 and armhf.
2020-01-24 09:03:02 +02:00
Christopher James Halse Rogers 2a58835f92 Snapcraft updates (#731)
* snap: Update rust compiler

* snap: Fix the build.

We now need libclang

* snap: Fix the non-x86 builds.

The goddamned environment variable is SNAPCRAFT_ARCH_TRIPLE*T*

* snap: Mark as stable.

The snap works fine; we don't need to warn people away
2020-01-22 14:10:49 +02:00
16 changed files with 10 additions and 31 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ executors:
working_directory: ~/projects/Plume working_directory: ~/projects/Plume
environment: environment:
RUST_TEST_THREADS: 1 RUST_TEST_THREADS: 1
FEATURES: <<#parameters.postgres>>postgres<</ parameters.postgres>><<^parameters.postgres>>sqlite<</parameters.postgres>>,ci FEATURES: <<#parameters.postgres>>postgres<</ parameters.postgres>><<^parameters.postgres>>sqlite<</parameters.postgres>>
DATABASE_URL: <<#parameters.postgres>>postgres://postgres@localhost/plume<</parameters.postgres>><<^parameters.postgres>>plume.sqlite<</parameters.postgres>> DATABASE_URL: <<#parameters.postgres>>postgres://postgres@localhost/plume<</parameters.postgres>><<^parameters.postgres>>plume.sqlite<</parameters.postgres>>
-1
View File
@@ -79,7 +79,6 @@ postgres = ["plume-models/postgres", "diesel/postgres"]
sqlite = ["plume-models/sqlite", "diesel/sqlite"] sqlite = ["plume-models/sqlite", "diesel/sqlite"]
debug-mailer = [] debug-mailer = []
test = [] test = []
ci = ["plume-models/ci", "plume-api/ci", "plume-common/ci"]
[workspace] [workspace]
members = ["plume-api", "plume-cli", "plume-models", "plume-common", "plume-front", "plume-macro"] members = ["plume-api", "plume-cli", "plume-models", "plume-common", "plume-front", "plume-macro"]
-3
View File
@@ -7,6 +7,3 @@ edition = "2018"
[dependencies] [dependencies]
serde = "1.0" serde = "1.0"
serde_derive = "1.0" serde_derive = "1.0"
[features]
ci = []
-2
View File
@@ -1,5 +1,3 @@
#![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#[macro_use] #[macro_use]
extern crate serde_derive; extern crate serde_derive;
-1
View File
@@ -23,4 +23,3 @@ path = "../plume-models"
[features] [features]
postgres = ["plume-models/postgres", "diesel/postgres"] postgres = ["plume-models/postgres", "diesel/postgres"]
sqlite = ["plume-models/sqlite", "diesel/sqlite"] sqlite = ["plume-models/sqlite", "diesel/sqlite"]
ci = ["plume-models/ci"]
+1 -2
View File
@@ -1,8 +1,7 @@
#![cfg_attr(not(feature = "ci"), warn(missing_docs))] use dotenv;
use clap::App; use clap::App;
use diesel::Connection; use diesel::Connection;
use dotenv;
use plume_models::{instance::Instance, Connection as Conn, CONFIG}; use plume_models::{instance::Instance, Connection as Conn, CONFIG};
use std::io::{self, prelude::*}; use std::io::{self, prelude::*};
-3
View File
@@ -30,6 +30,3 @@ version = "0.4"
[dependencies.pulldown-cmark] [dependencies.pulldown-cmark]
default-features = false default-features = false
version = "0.2.0" version = "0.2.0"
[features]
ci = []
-1
View File
@@ -1,4 +1,3 @@
#![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#[macro_use] #[macro_use]
-3
View File
@@ -13,6 +13,3 @@ gettext-utils = { git = "https://github.com/Plume-org/gettext-macros/", rev = "a
lazy_static = "1.3" lazy_static = "1.3"
serde = "1.0" serde = "1.0"
serde_json = "1.0" serde_json = "1.0"
[features]
ci = []
-1
View File
@@ -1,6 +1,5 @@
#![recursion_limit = "128"] #![recursion_limit = "128"]
#![feature(decl_macro, proc_macro_hygiene, try_trait)] #![feature(decl_macro, proc_macro_hygiene, try_trait)]
#![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#[macro_use] #[macro_use]
extern crate gettext_macros; extern crate gettext_macros;
-1
View File
@@ -19,4 +19,3 @@ syn = "0.15.27"
default = [] default = []
postgres = [] postgres = []
sqlite = [] sqlite = []
ci = []
-1
View File
@@ -1,5 +1,4 @@
#![recursion_limit = "128"] #![recursion_limit = "128"]
#![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#[macro_use] #[macro_use]
extern crate quote; extern crate quote;
-1
View File
@@ -54,4 +54,3 @@ diesel_migrations = "1.3.0"
[features] [features]
postgres = ["diesel/postgres", "plume-macro/postgres" ] postgres = ["diesel/postgres", "plume-macro/postgres" ]
sqlite = ["diesel/sqlite", "plume-macro/sqlite" ] sqlite = ["diesel/sqlite", "plume-macro/sqlite" ]
ci = ["plume-macro/ci"]
-1
View File
@@ -1,7 +1,6 @@
#![feature(try_trait)] #![feature(try_trait)]
#![feature(never_type)] #![feature(never_type)]
#![feature(proc_macro_hygiene)] #![feature(proc_macro_hygiene)]
#![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#[macro_use] #[macro_use]
extern crate diesel; extern crate diesel;
+8 -8
View File
@@ -8,7 +8,7 @@ description: |
* Media management: you can upload pictures to illustrate your articles, but also audio files if you host a podcast, and manage them all from Plume. * Media management: you can upload pictures to illustrate your articles, but also audio files if you host a podcast, and manage them all from Plume.
* Federation: Plume is part of a network of interconnected websites called the Fediverse. Each of these websites (often called instances) have their own rules and thematics, but they can all communicate with each other. * Federation: Plume is part of a network of interconnected websites called the Fediverse. Each of these websites (often called instances) have their own rules and thematics, but they can all communicate with each other.
* Collaborative writing: invite other people to your blogs, and write articles together. * Collaborative writing: invite other people to your blogs, and write articles together.
grade: devel # must be 'stable' to release into candidate/stable channels grade: stable
confinement: strict confinement: strict
apps: apps:
@@ -25,26 +25,26 @@ parts:
plume: plume:
plugin: rust plugin: rust
source: . source: .
rust-revision: nightly-2019-03-23 rust-revision: nightly-2020-01-15
build-packages: build-packages:
- libssl-dev - libssl-dev
- pkg-config - pkg-config
- libsqlite3-dev - libsqlite3-dev
- gettext - gettext
- on arm64,armhf,ppc64el,s390x: - libclang-9-dev
- lld-8 - lld-9
override-build: | override-build: |
snapcraftctl set-version $(git describe --tags) snapcraftctl set-version $(git describe --tags)
export PATH=$PATH:$HOME/.cargo/bin export PATH=$PATH:$HOME/.cargo/bin
rustup install stable rustup install --force --profile=minimal stable
cargo +stable install --force cargo-web cargo +stable install --force cargo-web
# Only Tier 1 Rust platforms get rust-lld # Only Tier 1 Rust platforms get rust-lld
# On the others (arm64, armhf, powerpc64, s390x) fall back to using # On the others (arm64, armhf, powerpc64, s390x) fall back to using
# the system LLD we've installed earlier. # the system LLD we've installed earlier.
case ${SNAPCRAFT_ARCH_TRIPLE} in \ case ${SNAPCRAFT_ARCH_TRIPLET} in \
aarch64-linux-gnu|arm-linux-gnueabihf|powerpc64-linux-gnu|s390x-linux-gnu) \ aarch64-linux-gnu|arm-linux-gnueabihf|powerpc64le-linux-gnu|s390x-linux-gnu) \
RUSTFLAGS="-C linker=lld-8" cargo web deploy -p plume-front --release \ RUSTFLAGS="-C linker=lld-9" cargo web deploy -p plume-front --release \
;; \ ;; \
*) \ *) \
cargo web deploy -p plume-front --release \ cargo web deploy -p plume-front --release \
-1
View File
@@ -1,5 +1,4 @@
#![allow(clippy::too_many_arguments)] #![allow(clippy::too_many_arguments)]
#![cfg_attr(not(feature = "ci"), warn(missing_docs))]
#![feature(decl_macro, proc_macro_hygiene, try_trait)] #![feature(decl_macro, proc_macro_hygiene, try_trait)]
#[macro_use] #[macro_use]