Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build for Linux/v2.9.0 #3545

Merged
merged 11 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 37 additions & 9 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-11]
os: [ubuntu-22.04, ubuntu-24.04, windows-latest, macos-latest, macos-11]
go-version: ['1.21']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
- uses: awalsh128/cache-apt-pkgs-action@latest
if: matrix.os == 'ubuntu-22.04'
with:
packages: libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
version: 1.0

- uses: awalsh128/cache-apt-pkgs-action@latest
if: matrix.os == 'ubuntu-24.04'
with:
packages: libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config
version: 1.0

- name: Setup Go
uses: actions/setup-go@v4
Expand All @@ -37,10 +45,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'
Expand Down Expand Up @@ -73,7 +86,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04, macos-11]
template:
[
svelte,
Expand Down Expand Up @@ -107,14 +120,29 @@ 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: Generate template '${{ matrix.template }}'
- 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 & 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
cd ${{ matrix.template }}
wails build -v 2

- 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

19 changes: 14 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,21 @@ jobs:
if: github.event.review.state == 'approved'
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: ['1.22']
os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04]
go-version: ['1.21']

steps:
- 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:
Expand All @@ -79,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 ./...
2 changes: 1 addition & 1 deletion v2/internal/frontend/desktop/linux/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading