diff --git a/.gitea/workflows/cross-compile.yaml b/.gitea/workflows/cross-compile.yaml index 233a797..5b75c18 100644 --- a/.gitea/workflows/cross-compile.yaml +++ b/.gitea/workflows/cross-compile.yaml @@ -9,21 +9,79 @@ on: - '*' jobs: - cross-compile: + compile-linux: runs-on: ubuntu-latest strategy: fail-fast: false steps: - name: Checkout and pull the code uses: actions/checkout@v5 - + - name: Setup the Go programming language uses: actions/setup-go@v6 with: go-version: 'stable' - - name: Install the Fyne cross-compile package - run: go install github.com/fyne-io/fyne-cross@latest + - name: Install build dependencies + run: | + apt-get update && apt-get install -y \ + build-essential libgl1-mesa-dev libx11-dev libxrandr-dev \ + libxi-dev libxcursor-dev libxinerama-dev libglfw3-dev \ + libxxf86vm-dev - - name: Cross compile linux - run: /root/go/bin/fyne-cross linux --icon Icon.png \ No newline at end of file + - name: Compile the fyne application for native Linux + run: | + export CGO_ENABLED=1 + export CC=gcc + export CXX=g++ + export GOOS=linux + export GOARCH=amd64 + go build -o ./pkcs-generator . + + - name: upload the building actifacts + uses: christopherHX/gitea-upload-artifact@v4 + with: + name: packages + path: | + ./pkcs-generator + retention-days: 3 + overwrite: true + + compile-windows: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout and pull the code + uses: actions/checkout@v5 + + - name: Setup the Go programming language + uses: actions/setup-go@v6 + with: + go-version: 'stable' + + - name: Install build dependencies + run: | + apt-get update && apt-get install -y \ + build-essential libgl1-mesa-dev libx11-dev libxrandr-dev \ + libxi-dev libxcursor-dev libxinerama-dev libglfw3-dev \ + libxxf86vm-dev gcc-mingw-w64 gcc-multilib + + - name: Compile the fyne application for Windows + run: | + export CGO_ENABLED=1 + export GOOS=windows + export GOARCH=amd64 + export CC=x86_64-w64-mingw32-gcc + export CXX=x86_64-w64-mingw32-g++ + export CGO_LDFLAGS="-static-libgcc -static-libstdc++" + go build -o ./pkcs-generator.exe -ldflags -H=windowsgui . + + - name: upload the building actifacts + uses: christopherHX/gitea-upload-artifact@v4 + with: + name: packages + path: | + ./pkcs-generator.exe + retention-days: 3 + overwrite: true diff --git a/.gitignore b/.gitignore index 55e79f0..070b2c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ * !*.* !*/ -fyne-cross *.exe