Commit Graph

58 Commits (aca6218c0a32b6ea45b57c7922593fde4a520a70)

Author SHA1 Message Date
Jonas Zohren 71cffcd537
feat(ci): Split clippy into own fallible job
For some reason, the clippy build does not work.
This change allows the cargo:test job to still succeed
and the pipeline to pass
2 years ago
Jonas Zohren 61277452af
chore(docker): Bump alpine (base image) version 2 years ago
Jonas Zohren 5a9462c9ab fix(ci): Fix musl builds
This pins the image to use for cross to a working image's sha256
2 years ago
Jonas Zohren ad6eb92bbd
feat(ci): Add dependency audit to CI tests 2 years ago
Jonas Zohren 8f063c99d5
chore(ci): Split up tests 2 years ago
Jonas Zohren b21a44ca4c
feat(ci): Lint dockerfiles with hadolint 2 years ago
Jonas Zohren 2645494582
fix(ci): Also run CI for git tags 2 years ago
Jonas Zohren 77f4b68c8e
fix(ci): Also create versioned docker image 2 years ago
Jonas Zohren 826b077e21
fix(ci): Always build debug version for sytest 2 years ago
Jonas Zohren fa4099b138 Use prebuilt CI-containers from https://gitlab.com/jfowl/conduit-containers
Also run all builds on approved MRs
2 years ago
Maxim De Clercq ff16729976
fix: correct RUSTC_WRAPPER path in cross container 2 years ago
Maxim De Clercq 067fcfc0e4
fix: remove trailing slash from shared path 2 years ago
Maxim De Clercq 77ad4cb8f8
fix: use readelf for checking static compilation 2 years ago
Maxim De Clercq 64c25ea4a1
fix: always print ELF information 2 years ago
Maxim De Clercq 219dfbabd5
fix: pass RUSTC_WRAPPER to the cross container and enforce static builds 2 years ago
Maxim De Clercq fd67cd7450
feat: support targetting i686 2 years ago
Maxim De Clercq cd9902637d
feat: use rustembedded/cross images and use static relocation model to fix cross-compile 2 years ago
Maxim De Clercq a021680591
fix: make sure libatomic is always linked because it's skipped on arm targets 2 years ago
Maxim De Clercq 3e9abfedb4
fix: make sure libstdc++ is linked statically when cross-compiling 2 years ago
Maxim De Clercq bfef94f5f4
fix: linking against libatomic is no longer required since the library path is fixed 2 years ago
Maxim De Clercq d94f3c1e9a
fix: make sure cc-rs and bindgen use the correct paths when cross-compiling 2 years ago
Jonas Platte 8d81c1c072
Use MSRV for build CI jobs
The test job will use the latest stable so all stable lints are included.
2 years ago
Jonas Zohren 10f1da12bf CI: Fix cargo-test 2 years ago
Jonas Zohren f67785caaf Fix(ci): Disable CARGO_HOME caching 3 years ago
Jonas Zohren adb518fa0d
CI: Use curl instead of wget
The rust docker image already comes with curl, no need to install wget.
3 years ago
Jonas Zohren f91216dd3c
CI: Optionally use sccache for compilation
This moves compiler caching for incremental builds away from GitLab
caching the whole target/ folder to caching each code unit in S3.
This aleviates the need to zip and unzip and just caches on the fly.

This feature is optional and gated behind the SCCACHE_BIN_URL env
3 years ago
Jonas Zohren 9bfc7b34b6 Fixes for !225 3 years ago
Jonas Zohren 2fff720df3 CI: New Multiarch builds and Docker images + cargo clippy/test output now integrated into GitLab 3 years ago
Jonas Zohren e8d998cedf fix(ci): Convince kaniko that it is indeed running in a container by --force-ing it. 3 years ago
Jonas Zohren ab472e9b7c fix(ci): Fix aarch64 build
gcc-8-aarch64-linux-gnu is not available in debian 11 (which the rust image uses), so update to gcc-10

Signed-off-by: Jonas Zohren <git-pbkyr@jzohren.de>
3 years ago
Jonas Zohren 422bd09e32 Remove the "register an account with element" test
Broke due to a timeout and Timo does not like broken tests.
Less testing means less failing tests.

Also, hopefully sytest is less broken now.
3 years ago
Jonas Zohren a1f51440e2 chore(CI): Adjust CI for master and next branch development model
- Build release builds for branches "master" and "next"
- Push docker images under different tags, depending on why the pipeline started
  - branch master: push to `latest`
  - branch next: push to `next`
  - tag: push to `$TAG_NAME`

Signed-off-by: Jonas Zohren <git-pbkyr@jzohren.de>
3 years ago
Jonas Zohren 3357bbec1e chore: Also run CI on git tags, not only new commits.
Signed-off-by: Jonas Zohren <git-pbkyr@jzohren.de>
3 years ago
Daniel Wiesenberg a08ea15695 Use `$CI_COMMIT_SHORT_SHA` for `GIT_REF`
Using `$CI_COMMIT_REF_NAME` means we get `master` for every image build,
which is not very useful/informative. Using `$CI_COMMIT_SHORT_SHA`,
on the other hand, makes it possible to see exactly from which commit an
image was built.
3 years ago
Jonas Zohren b6e755f67e Only apply max. optimizations in CI builds.
The average german man has a life expectancy of 78.7 years, or 689884.2 hours.
Assuming that Timo is 20 years old, he has rougly 514564.2 hours left on planet earth.
Also assuming that cross release builds took him 25 minutes before,
but 2-2.5x of that with the current release compilation config he wasted roughly an hour waiting for it to complete.
If he continued to work on Conduit for 20 more years (or 175320 hours),
and makes a release compilation about once per day, this means 7305 hours or 304 days wasted waiting for the rust compiler.
By cutting that back down to the original settings, he get's 182 days of his life back.
That's about 0.63% of his remaining life.
182 joyful days he can spend with family and loved ones.
3 years ago
Jonas Zohren 9c3a8edcae Use full optimizations for master and faster config else
Signed-off-by: Jonas Zohren <git-pbkyr@jzohren.de>
3 years ago
Daniel Wiesenberg fcd127aadc Also push docker image to docker hub 3 years ago
Jonas Zohren 0a8dadb797 Add hardcoded artifacts.expose_as to show them in MRs 3 years ago
Jonas Zohren 678ce0abc6 CI: Create docker image with musl binary 3 years ago
Jonas Zohren d6b37480e7 CI: Fix package upload 3 years ago
Jonas Zohren 130b9841da CI: Add sytest 3 years ago
Jonas Zohren 2babff1e41 CI: Test registration with element web 3 years ago
Jonas Zohren eaa4c77641 CI: Check format before running test
Testing needs compilation and is slow. Format checking is quick.
As format checking fails more often than tests,
switching them should result in faster failure and feedback
3 years ago
Jonas Zohren 3fa09ff57d Use thin-lto [1] for "better" release builds.
This performs a rather quick variant of Link Time Optimization [2].
It should add negligible build time but also more optimized binaries.

[1]: https://doc.rust-lang.org/cargo/reference/profiles.html#lto

[2]: https://llvm.org/docs/LinkTimeOptimization.html
3 years ago
Jonas Zohren 0080932aef Speed up release builds
Setting cargo to run incremental builds means partial build results should be cached. This is not enabled by default in release mode.

Incremental builds use 256 codegen units by default [1].
We set them to 16 (release default) again for somewhat faster code but slightly slower builds.


[1]: https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units
3 years ago
Jonas Zohren 888a2f7fa1 Make CI run on famedly runners
By default, jobs without tags only run on CI runners configured to do so [1].
Conduit can use famedly runners, which are more powerfull than gitlab's runners, but require a tag on the job to run it there.
This commit tags each job with the "docker" tag.
On the famedly/conduit repo this means faster CI.
On other gitlab.com forks the normal ci.
Selfhosted gitlab's might need to add a "docker" tag to their runner.

[1]: https://docs.gitlab.com/ee/ci/runners/configure_runners.html#use-tags-to-limit-the-number-of-jobs-using-the-runner
3 years ago
Jonas Zohren 36681dd3ac Fix: Duplicate releases don't work, remove nightly 3 years ago
Jonas Zohren fcc30f059e Fix: Nightly release tag name should not be a branch name
According to tulir this breaks the GitLab Matrix bot, and nightly is a better match anyway
3 years ago
Jonas Zohren a7cb1c999a Publish master builds as nightly releases & also build debs 3 years ago
Jonas Fowl b84c66daba Generate binaries for 3 architectures in the CI
The result is stored in the gitlab package registry
3 years ago