tauri-apps / tauri-docs

The source for all Tauri project documentation.
https://tauri.app
MIT License
816 stars 615 forks source link

Add copy-pastable `.gitlab-ci.yml` for cross building and bundling to building documentation #1313

Open julianbuettner opened 1 year ago

julianbuettner commented 1 year ago

Motivation

There is a way to cross build and bundle Tauri applications, but it's limited to GitHub.
(See documentation/guide here)
However, a lot of (self-host) people and companies use GitLab, therefore it would be great to have a copy-pastable configuration (.gitlab-ci.yml) for each target OS.
Ideally all available bundle types should be built.

Issue

Cross building is not easy, and one has to read through quite some documentation and try a lot of things to get GitLab pipelines running.
I was searching for a Tauri project hosted on GitLab, but was not able to find one which also has cross building and bundling in there pipelines.

I tried writing a GitLab pipeline, which somehow even got a Windows .exe as an GitLab pipeline artifact, but sadly it complains about a missing .dll file.

Considerations

A default pipeline would be quite inefficient, as packages have to be reinstalled or even compiled every time (on top of the rust container). A custom container would be better, but is an increadible effort, which is why I would consider it out of scope. In a similiar matter, caching would have to be configured.
However, both problems could be considerd to be solved by the user.

Possible solution

Reconstructing the commands taken in the GitHub actions, putting those into a valid .gitlab-ci.yml (or n yaml files, for each target OS) and reference it on documentation: Cross-Platform Compilation

simonhyll commented 1 year ago

We will cover this probably in the Build guide under a CI/CD section. Tracking for 2.0.