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

CircleCI integration (abandoned due to memory limitations exceeded by steven_blocks) #174

Closed
wants to merge 17 commits into from

Conversation

iceiix
Copy link
Owner

@iceiix iceiix commented May 30, 2019

Add CircleCI for continuous integration testing (to replace Travis-CI since it is unreliable, removed #173)

iceiix added 10 commits May 30, 2019 16:39
!/bin/sh -eo pipefail
 ERROR IN CONFIG FILE:
 [#/commands/steps] 0 subschemas matched instead of one
 1. [#/commands/steps] expected type: Mapping, found: Sequence
 |   SCHEMA:
 |     type: object
 |   INPUT:
 |     - run:
 |         name: Install deps
 |         command: |
 |           apt-get update -qq
 |           apt-get install -y gcc libegl1-mesa-dev libgles2-mesa-dev
 2. [#/commands/steps] expected type: String, found: Sequence
 |   Command may be a string reference to another command
@iceiix
Copy link
Owner Author

iceiix commented May 31, 2019

https://github.com/kkat0/circleci-demo/blob/master/.circleci/config.yml
https://circleci.com/orbs/registry/orb/brownjohnf/rust
https://circleci.com/docs/2.0/config-intro/#section=configuration
https://github.com/iceiix/stevenarella/blob/master/.travis.yml

apt-get update -qq
apt-get install -y gcc libegl1-mesa-dev libgles2-mesa-dev
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
Exited with code 100

@iceiix
Copy link
Owner Author

iceiix commented May 31, 2019

Now it starts to compile, but fails on steven_block presumably due to it taking too long and getting killed:

Compiling steven_blocks v0.0.1 (/home/circleci/project/blocks)
error: Could not compile steven_blocks.
Caused by:
process didn't exit successfully: rustc --edition=2018 --crate-name steven_blocks blocks/src/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=1 -C debuginfo=2 -C debug-assertions=on -C metadata=f075b47a22a14b9e -C extra-filename=-f075b47a22a14b9e --out-dir /home/circleci/project/target/debug/deps -C incremental=/home/circleci/project/target/debug/incremental -L dependency=/home/circleci/project/target/debug/deps --extern cgmath=/home/circleci/project/target/debug/deps/libcgmath-7e42c727d885f3b2.rlib --extern collision=/home/circleci/project/target/debug/deps/libcollision-b347925427f3c1fa.rlib --extern lazy_static=/home/circleci/project/target/debug/deps/liblazy_static-689264c3098305bd.rlib --extern steven_shared=/home/circleci/project/target/debug/deps/libsteven_shared-f8fe3808c85e7e85.rlib (signal: 9, SIGKILL: kill)
Exited with code 101

@iceiix
Copy link
Owner Author

iceiix commented May 31, 2019

Maybe not a timeout? https://circleci.com/gh/iceiix/stevenarella/11 same failure, (signal: 9, SIGKILL: kill), but the Build step only took 03:17, nowhere near the 10:00 default limit. Found this:

https://support.circleci.com/hc/en-us/articles/360002341673-Identifying-Exit-Codes-and-their-meanings

In the scope of CircleCI, 'SGKILL' likely means your build went over its allocated resources, such as RAM, and was ended in response.

Resources: 2CPU/4096MB

https://circleci.com/docs/2.0/configuration-reference/#resource_class

Note: A paid plan is required to use the resource_class feature. If you are on a the container-based plan you will need to open a support ticket to have a CircleCI Sales representative contact you about enabling this feature on your account.

The default medium is 4GB, also available is medium+ (6GB), large (8GB), and xlarge (16GB), with a cost.

Is this project too big for CircleCI's free tier?

@iceiix
Copy link
Owner Author

iceiix commented May 31, 2019

I do see high memory usage on my local system when building steven_blocks:

Screen Shot 2019-05-30 at 6 00 02 PM

3.33 GB in rustc is kind of ridiculous, as is the time required to build. All the blocks are defined in a big hairy recursive macro. This is useful because it allows properties to be defined through code (expressions - for data, offset, variant, update_state, and more) but should probably be rethought in order to compile in a more reasonable spacetime, and for runtime block registration (for modded blocks beyond the #153 demo)

Previously, only the * and + operators were available, for 0 or more and
1 or more, respectively, so steven_blocks used * for optional tokens
even though only one would be expected in most cases.

Rust version 1.32.0 added a new operator, ?, for zero or one:

https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1320-2019-01-17
> You can now use the ? operator in macro definitions. The ? operator allows
> you to specify zero or one repetitions similar to the * and + operators.
rust-lang/rust#56245

Change to use ? instead of * for these optional repetitions.
Previously, only the * and + operators were available, for 0 or more and
1 or more, respectively, so steven_blocks used * for optional tokens
even though only one would be expected in most cases.

Rust version 1.32.0 added a new operator, ?, for zero or one:

https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1320-2019-01-17
> You can now use the ? operator in macro definitions. The ? operator allows
> you to specify zero or one repetitions similar to the * and + operators.
rust-lang/rust#56245

Change to use ? instead of * for these optional repetitions.
Found this while investigating #174.
iceiix added a commit that referenced this pull request May 31, 2019
Previously, only the * and + operators were available, for 0 or more and
1 or more, respectively, so steven_blocks used * for optional tokens
even though only one would be expected in most cases.

Rust version 1.32.0 added a new operator, ?, for zero or one:

https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1320-2019-01-17
> You can now use the ? operator in macro definitions. The ? operator allows
> you to specify zero or one repetitions similar to the * and + operators.
rust-lang/rust#56245

Change to use ? instead of * for these optional repetitions.
Found this while investigating #174.
@iceiix
Copy link
Owner Author

iceiix commented May 31, 2019

Changing * to ? in seems to slightly reduce memory consumption (maybe not), but not enough to build on CircleCI's free tier 4GB medium container.

Disabled building on CircleCI for now. Buildkite is looking more attractive, building on my own systems without restrictions, but would require more work to setup the infrastructure. Also to try: https://gitlab.com/ and https://builds.sr.ht

@iceiix
Copy link
Owner Author

iceiix commented May 31, 2019

#176 builds.sr.ht - works instead of CircleCI, to use that instead.

@iceiix iceiix closed this May 31, 2019
@iceiix iceiix deleted the circleci branch May 31, 2019 15:44
@iceiix iceiix changed the title CircleCI CircleCI integration (abandoned due to memory limitations exceeded by steven_blocks) Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant