From ffb837ae798fe71f9a384f68c9186583ecf119e4 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 19:58:24 +1000 Subject: [PATCH 01/11] Fix #3542 --- .github/workflows/build-and-test.yml | 18 +++++++++++++----- .github/workflows/pr.yml | 8 ++++++-- v2/internal/frontend/desktop/linux/window.c | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 58a7d287b99..47b0c4ba37f 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -19,10 +19,14 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install linux dependencies - if: matrix.os == 'ubuntu-latest' + - name: Install linux dependencies ( 22.04 ) + if: matrix.os == 'ubuntu-22.04' run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config + - name: Install linux dependencies ( 24.04 ) + if: matrix.os == 'ubuntu-24.04' + run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config + - name: Setup Go uses: actions/setup-go@v4 with: @@ -73,7 +77,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest, macos-latest, ubuntu-24.04] template: [ svelte, @@ -107,10 +111,14 @@ jobs: go install wails -help - - name: Install linux dependencies - if: matrix.os == 'ubuntu-latest' + - name: Install linux dependencies ( 22.04 ) + if: matrix.os == 'ubuntu-22.04' run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config + - name: Install linux dependencies ( 24.04 ) + if: matrix.os == 'ubuntu-24.04' + run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config + - name: Generate template '${{ matrix.template }}' run: | mkdir -p ./test-${{ matrix.template }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0973cb65e01..2b1593af930 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -62,10 +62,14 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Install linux dependencies - if: matrix.os == 'ubuntu-latest' + - name: Install linux dependencies ( 22.04 ) + if: matrix.os == 'ubuntu-22.04' run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config + - name: Install linux dependencies ( 24.04 ) + if: matrix.os == 'ubuntu-24.04' + run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config + - name: Setup Go uses: actions/setup-go@v3 with: diff --git a/v2/internal/frontend/desktop/linux/window.c b/v2/internal/frontend/desktop/linux/window.c index 49de5197803..0dee24f4256 100644 --- a/v2/internal/frontend/desktop/linux/window.c +++ b/v2/internal/frontend/desktop/linux/window.c @@ -507,7 +507,7 @@ GtkWidget *SetupWebview(void *contentManager, GtkWindow *window, int hideWindowO if(disableWebViewDragAndDrop) { - gtk_drag_dest_unset(G_OBJECT(webview)); + gtk_drag_dest_unset(webview); } if(enableDragAndDrop) From e0bf875f436d9e25df8ce84ba1aac8b15870f93e Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 20:02:44 +1000 Subject: [PATCH 02/11] Pipeline updates --- .github/workflows/build-and-test.yml | 4 ++-- .github/workflows/pr.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 47b0c4ba37f..101974c3688 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest, macos-11] + os: [ubuntu-22.04, windows-latest, macos-latest, macos-11] go-version: ['1.21'] steps: @@ -77,7 +77,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, windows-latest, macos-latest, ubuntu-24.04] + os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04] template: [ svelte, diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2b1593af930..2835dbc95cf 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -55,7 +55,7 @@ jobs: if: github.event.review.state == 'approved' strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04] go-version: ['1.22'] steps: From 886ec8d7342ed555bcebc0be6c8cbcf66661266f Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 20:04:43 +1000 Subject: [PATCH 03/11] More Pipeline updates --- .github/workflows/build-and-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 101974c3688..cc15396d3cf 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-latest, macos-latest, macos-11] + os: [ubuntu-22.04, ubuntu-24.04, windows-latest, macos-latest, macos-11] go-version: ['1.21'] steps: @@ -77,7 +77,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04] + os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04, macos-11] template: [ svelte, From bc1b23ca92c7e2837d6819b28d683ad4c890cfa7 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 20:08:16 +1000 Subject: [PATCH 04/11] Test against 1.21 --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2835dbc95cf..657c91a0245 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -56,7 +56,7 @@ jobs: strategy: matrix: os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04] - go-version: ['1.22'] + go-version: ['1.21'] steps: - name: Checkout code From 5d0b9b7a7f6930b3d3fefeb43aa98e04b604d69a Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 20:21:53 +1000 Subject: [PATCH 05/11] Add build tag for 24.04 --- .github/workflows/build-and-test.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index cc15396d3cf..012a45c4a97 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -124,5 +124,15 @@ jobs: mkdir -p ./test-${{ matrix.template }} cd ./test-${{ matrix.template }} wails init -n ${{ matrix.template }} -t ${{ matrix.template }} -ci + + - name: Build template '${{ matrix.template }}' + if: matrix.os != 'ubuntu-24.04' + run: | cd ${{ matrix.template }} wails build -v 2 + + - name: Build template '${{ matrix.template }}' (Ubuntu 24.04) + if: matrix.os == 'ubuntu-24.04' + run: | + cd ${{ matrix.template }} + wails build -v 2 -tags webkit2_41 From 01378f62793d92803926da51371fac29e312ece4 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 20:24:49 +1000 Subject: [PATCH 06/11] Update test for 24.04 --- .github/workflows/build-and-test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 012a45c4a97..14e7a4b0171 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -41,10 +41,15 @@ jobs: run: go test -v ./... - name: Run tests (!mac) - if: matrix.os != 'macos-latest' && matrix.os != 'macos-11' + if: matrix.os != 'macos-latest' && matrix.os != 'macos-11' && matrix.os != 'ubuntu-24.04' working-directory: ./v2 run: go test -v ./... + - name: Run tests (Ubuntu 24.04) + if: matrix.os == 'ubuntu-24.04' + working-directory: ./v2 + run: go test -v ./...-tags webkit2_41 + test_js: name: Run JS Tests if: github.repository == 'wailsapp/wails' From 6dca7d7276ba3a9ad72fbbcb95de723c679dba4e Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 20:26:33 +1000 Subject: [PATCH 07/11] Update test for 24.04 --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 14e7a4b0171..4662c37be47 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -48,7 +48,7 @@ jobs: - name: Run tests (Ubuntu 24.04) if: matrix.os == 'ubuntu-24.04' working-directory: ./v2 - run: go test -v ./...-tags webkit2_41 + run: go test -v ./... -tags webkit2_41 test_js: name: Run JS Tests From 5b044608f15c2acfc754b86dcd59e97d2a71aba1 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 20:42:59 +1000 Subject: [PATCH 08/11] Update test for 24.04 --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 4662c37be47..ad31868b8fa 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -48,7 +48,7 @@ jobs: - name: Run tests (Ubuntu 24.04) if: matrix.os == 'ubuntu-24.04' working-directory: ./v2 - run: go test -v ./... -tags webkit2_41 + run: go test -v -tags webkit2_41 ./... test_js: name: Run JS Tests From 0107429092b4ce47460e874ac3a4da5440d5d558 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 21:02:19 +1000 Subject: [PATCH 09/11] Update build for 24.04 --- .github/workflows/build-and-test.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ad31868b8fa..f4a9a314de9 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -124,20 +124,21 @@ jobs: if: matrix.os == 'ubuntu-24.04' run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config - - name: Generate template '${{ matrix.template }}' + - name: Generate & Build template '${{ matrix.template }}' + if: matrix.os != 'ubuntu-24.04' run: | mkdir -p ./test-${{ matrix.template }} cd ./test-${{ matrix.template }} wails init -n ${{ matrix.template }} -t ${{ matrix.template }} -ci - - - name: Build template '${{ matrix.template }}' - if: matrix.os != 'ubuntu-24.04' - run: | cd ${{ matrix.template }} wails build -v 2 - - name: Build template '${{ matrix.template }}' (Ubuntu 24.04) + - name: Generate & Build template '${{ matrix.template }}' (ubuntu-24.04) if: matrix.os == 'ubuntu-24.04' run: | + mkdir -p ./test-${{ matrix.template }} + cd ./test-${{ matrix.template }} + wails init -n ${{ matrix.template }} -t ${{ matrix.template }} -ci cd ${{ matrix.template }} wails build -v 2 -tags webkit2_41 + From 750d60aa9324417ef6067fb98d18132f73cc6a47 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 21:09:27 +1000 Subject: [PATCH 10/11] Cache apt packages --- .github/workflows/build-and-test.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f4a9a314de9..cd9cfa42a1c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -19,13 +19,17 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install linux dependencies ( 22.04 ) + - uses: awalsh128/cache-apt-pkgs-action@latest if: matrix.os == 'ubuntu-22.04' - run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config + with: + packages: libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config + version: 1.0 - - name: Install linux dependencies ( 24.04 ) + - uses: awalsh128/cache-apt-pkgs-action@latest if: matrix.os == 'ubuntu-24.04' - run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config + with: + packages: libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config + version: 1.0 - name: Setup Go uses: actions/setup-go@v4 From 52583cbab79a87a4469e298d9a6f031082df5d5d Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 17 Jun 2024 21:34:56 +1000 Subject: [PATCH 11/11] Fix test in PR pipeline --- .github/workflows/pr.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 657c91a0245..c70050276e1 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -83,6 +83,11 @@ jobs: run: go test -v ./... - name: Run tests (!mac) - if: matrix.os != 'macos-latest' + if: matrix.os != 'macos-latest' && matrix.os != 'ubuntu-24.04' working-directory: ./v2 run: go test -v ./... + + - name: Run tests (Ubuntu 24.04) + if: matrix.os == 'ubuntu-24.04' + working-directory: ./v2 + run: go test -v -tags webkit2_41 ./...