From cd3fb8f6fca28d8ab62fdfc0e2de349636a345fb Mon Sep 17 00:00:00 2001 From: Robbie Blaine Date: Fri, 9 May 2025 13:49:03 +0200 Subject: [PATCH] Upgrade Github Runners to Ubuntu 24.04 Fix `FileNotFoundException` errors when running tests on Ubuntu 24.04. Tests were failing because the user data directory did not exist in the new GitHub Ubuntu-24.04 runner environment. The change: - Updates all GitHub Actions workflows to use `ubuntu-24.04` - Creates `~/.local/share` directory in CI pipeline to ensure the user data directory exists during tests This resolves the blocking issue that prevented the Ubuntu upgrade by ensuring the required directory structure exists in the CI environment. --- .github/workflows/build.yml | 11 ++++++++--- .github/workflows/codacy-code-reporter.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/label.yml | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f62788ff1..016e46c263 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,11 +14,11 @@ jobs: build: strategy: matrix: - os: [ubuntu-22.04, ubuntu-22.04-arm, macos-13, macos-15, windows-latest] + os: [ubuntu-24.04, ubuntu-24.04-arm, macos-13, macos-15, windows-latest] include: - - os: ubuntu-22.04 + - os: ubuntu-24.04 arch: x86_64 - - os: ubuntu-22.04-arm + - os: ubuntu-24.04-arm arch: aarch64 - os: macos-13 arch: x86_64 @@ -38,6 +38,11 @@ jobs: java-version: '21' distribution: 'adopt' cache: gradle + - name: Create local share directory + # ubuntu-24.04 Github runners do not have `~/.local/share` directory by default. + # This causes issues when testing `FileTransferSend` + if: runner.os == 'Linux' + run: mkdir -p ~/.local/share - name: Build with Gradle with tests if: ${{ !(runner.os == 'Linux' && matrix.arch == 'aarch64') }} run: ./gradlew build --stacktrace --scan diff --git a/.github/workflows/codacy-code-reporter.yml b/.github/workflows/codacy-code-reporter.yml index be76ef35ef..57408dc770 100644 --- a/.github/workflows/codacy-code-reporter.yml +++ b/.github/workflows/codacy-code-reporter.yml @@ -9,7 +9,7 @@ jobs: build: if: github.repository == 'haveno-dex/haveno' name: Publish coverage - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7e0fefe9e7..857a27c08e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -18,7 +18,7 @@ on: jobs: analyze: name: Analyze - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: actions: read contents: read diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 50ece9050c..4cd7cfa250 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -7,7 +7,7 @@ on: jobs: issueLabeled: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Bounty explanation uses: peter-evans/create-or-update-comment@v3