Skip to content

Improve CI/build/pre-built #118

Open

Description

@konsumer

I think we can improve CI a bit, and make the prebuilt system work better overall

  • Just build pre-builts once for each platform (no multiple node versions needed)
  • run tests as separate action on more node versions (for example include 10 and 17, since it's current)
  • Get non-x86-64 builds working (pi, M1)
  • move artifacts to tagged release (or figure out a better way to find the "best" artifact to use for a pre-built)

"best" artifact

We should have fall-through logic for choosing the best version for a supported platform/arch.

graph TD
    ENV{Is an env-var set to force build?}
    FS{Is it already built locally in target dir?}
    GIT{Is this a git repo?}
    TAGGED{Is this tagged with something already in releases?}
    PKG{Is this package.json version in releases?}
    
    BUILD[Build using cmake]
    RELEASE[Download github release artifact]
    
    ENV --> |yes| BUILD
    ENV --> |no| FS

    FS --> |yes| FS_USE(use that)
    FS --> |no| GIT

    GIT --> |yes| TAGGED
    GIT --> |no| PKG

    TAGGED ==> |yes| RELEASE
    TAGGED ==> |no| PKG

    PKG --> |yes| RELEASE
    PKG --> |no| BUILD

Loading

Diagram is a bit crazy, but I think this would cascade correctly. I think we could make tags & branches build in CI, too, so if you don't set the env-var to force build, you can use the pre-built for that branch (like use whatever is the current raylib4-0.8.1 build for your platform, rather than fall right through to building.

Activity

  1. added
    raylib4
    on Mar 16, 2022
  2. konsumer commented on Mar 16, 2022

    @konsumer
    CollaboratorAuthor

    If you want to modify the diagram, here is the source I used:

    graph TD
        ENV{Is an env-var set to force build?}
        FS{Is it already built locally in target dir?}
        GIT{Is this a git repo?}
        TAGGED{Is this tagged with something already in releases?}
        PKG{Is this package.json version in releases?}
        
        BUILD[Build using cmake]
        RELEASE[Download github release artifact]
        
        ENV --> |yes| BUILD
        ENV --> |no| FS
    
        FS --> |yes| FS_USE(use that)
        FS --> |no| GIT
    
        GIT --> |yes| TAGGED
        GIT --> |no| PKG
    
        TAGGED ==> |yes| RELEASE
        TAGGED ==> |no| PKG
    
        PKG --> |yes| RELEASE
        PKG --> |no| BUILD
    
    

    set the language for code-block to mermaid and it will draw it. You can edit it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    raylib4

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions