dawenxi-tech / 2fa

A 2FA desktop application.
MIT License
2 stars 1 forks source link

linux ci build failing #29

Closed gedw99 closed 11 months ago

gedw99 commented 11 months ago

hey @heramerom

Saw that you gave linux build a try.

looks like we need the following:

https://gioui.org/doc/install/linux

this gio project shows what we need in CI: https://github.com/g45t345rt/g45w/blob/master/.github/workflows/build_linux.yml

so because we use makefile, all we need is this during the linux build part of the dep-tools. We can sniff what OS is it in side the dep-tools. This should help the preview gio tool to install perhaps, so do it early in the dep-tools phase.

sudo apt install gcc pkg-config libwayland-dev libx11-dev libx11-xcb-dev libxkbcommon-x11-dev libgles2-mesa-dev libegl1-mesa-dev libffi-dev libxcursor-dev libvulkan-dev
heramerom commented 11 months ago

Yeah, you are right. I will fix it. Thank you!

gedw99 commented 11 months ago

so I guess like this


dep-tools:
    @echo ""
    @echo "Installing tools ..."

ifeq ($(OS_GO_OS),windows)
    @echo ""
    @echo "Detected Windows ..."

       # see: https://gioui.org/doc/install/windows
    @echo ""
endif

ifeq ($(OS_GO_OS),darwin)
    @echo ""
    @echo "Detected Darwin so building ..."
        # see: https://gioui.org/doc/install/macos

        # for pack phase later, but do now so its done only once
    brew install create-dmg
    @echo ""
endif

ifeq ($(OS_GO_OS),linux)
    @echo ""
    @echo "Detected Linux ..."
        # see: https://gioui.org/doc/install/linux
        sudo apt install gcc pkg-config libwayland-dev libx11-dev libx11-xcb-dev libxkbcommon-x11-dev libgles2-mesa-dev libegl1-mesa-dev libffi-dev libxcursor-dev libvulkan-dev
    @echo ""
endif
    @echo ""

    @echo "Installing icon generation tools ..."
        @echo ""
    # icns maker doing png to icns and icns viewer for checking they are ok.
    # https://github.com/JackMordaunt/icns/releases/tag/v2.2.7
    go install github.com/jackmordaunt/icns/v2/cmd/icnsify@v2.2.7
    # only works on latest...
    #go install github.com/jackmordaunt/icns/cmd/preview@v2.2.7
    go install github.com/jackmordaunt/icns/cmd/preview@latest

        @echo "Installing gio build tool ..."
        @echo ""
    # gio command for building cross platform
    # https://github.com/gioui/gio-cmd
    go install gioui.org/cmd/gogio@latest

    # simple file listing help
    # https://github.com/a8m/tree
    go install github.com/a8m/tree/cmd/tree@latest

    # easy way to migrate golang code to latest dependencies
    # https://github.com/oligot/go-mod-upgrade/releases/tag/v0.9.1
    go install github.com/oligot/go-mod-upgrade@v0.9.1

    @echo "Dep tools phase done ..."
        @echo ""
heramerom commented 11 months ago

Thank you!

gedw99 commented 11 months ago

hey @heramerom

I got the linux dependencies working now using the above approach. now the golang gio tools also work I think..

The comments have a reference to how another GIO project does their CI, which is a lucky find. We can add Android later etc.

So from what I can see you just need to adjust the Linux build part now. https://github.com/dawenxi-tech/2fa/actions/runs/7116363816/job/19374631183 shows what I mean ...

gedw99 commented 11 months ago

I think we are good now. so closing this...