-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add CI system and integrate into pages #5
Comments
I think we can use this https://github.com/peaceiris/actions-mdbook I used it earlier in my personal mdbook note and it seems working pretty well. Should I create a PR here for you? It's basically adding a yml file then change the repo setting like this: Or... we are not using a standard mdbook perhaps it needs to be tweaked or? 🤔 |
We're using mdbook here, but with some tweaks 😆 so there is the plugin https://github.com/rust-ml/book/tree/master/mdbook-scientific which basically adds special syntax for latex/gnuplot code blocks. The environment would need:
I know that these are a lot of dependencies, but perhaps you can use the mdbook action as baseline and then install/compile the rest |
I see. I am not that experienced with github action yet but this is probably can be done. |
@bytesnake I tried to make an PR #8 to make the first version CI work. How do you like the general idea? It is not fully working yet, but I guess with |
#8 indeed can trigger github actions but the build failed. I will take a deeper look later this week :) |
So I tried to let the build scrip just run twice then it can be built. Seems like a race condition thing perhaps? So when building the first time, some build process didn't wait for the needed middle files to be generated on disk?
I noticed second build can work is because I remembered days ago I made the image to work with the book on that build branch. As I am on a new computer now, I noticed the image was not working, but simply try running again without touching anything made the build works. But I guess it still only works with the book of the version that is on the build branch. Need to solve how to make master branch also works later. Anyway you have something here already https://rust-ml.github.io/book/ |
Just some helpful note here for anyone would like to try to use the image on master to build the book and see the error:
or if you want to take a look inside docker:
The error looks like this:
I have no clue what hyperplane is about... |
first: thanks for all the work! I will try to reproduce the build error inside the docker image. I have currently too many side-projects to really focus on one thing, what always works is 1-to-1 meetings and debugging code together. Perhaps I'll find time this evening, but otherwise I'll propose that you join in the bi-monthly meetings and we can look into the issue afterwards? |
Oh cool. I might have time tonight as well. I haven't joined the bi-monthly meetings before but I would like to come join once and listen to your discussion. However I might be difficult to find time on Wednesday as I have some club activity on Wednesday evening. But let's see, maybe I can join someday. |
I'm giving it a try now, posted a link in zulip.
would be awesome! |
Okay, so I made a large (if not huge) image to include all the rust build environment as well. So basically you can either try pull the image (which might take a long time)
or build the image on your own (also very slow the first time) by checking out that * If you just pull the image (the easy way)Then I guess it's simple as you can test your Rust code changes by running the image via interaction mode, such as:
Then you can do build and run as if you are inside an ubuntu:
Then your updated Rust code will run * If you decide to build the image on your own (the harder way)Basically you can just cp your original Dockerfile into a backup file, then use the Dockerfile from the branched I mentioned above.
Each time you update the Rust code, you need to re-run the build step above so the new binary is baked into the image.
@bytesnake Let me know whether this helps :) |
Here I just put some command I ran as a demo:
Now you see it compiles (as it is on the build branch).
You can see the changes in Rust code taking effect. Hopefully this helps! :) |
the asset config was just set to the wrong path. Replacing |
aha? let me give it a try the other day :) |
I'm not sure but the use of assets is not explained .. @quietlychris |
I honestly am not sure why it got changed from |
no worries 😄 the only place where the source folder is actually used is when a latex file is loaded. So it could probably be replace, but haven't looked into it yet |
CI should be ready after this #9 |
@bytesnake Just wanted to follow up on this, and maybe try to have the CI pushing to the Github Pages site over the next two weeks. I think that as liufuyang mentioned in his last comment in #9, would it possibly make sense to move |
yes moving |
CI updates to Github Actions with |
We should build and publish the book automatically to
rust-ml.github.io/book
on each push:gh
branch with artifactsThe text was updated successfully, but these errors were encountered: