Linux ARM: java/bin/java: Exec format error
I updated my GitHub Action workflow from Github hosted Linux x64 to Linux Arm, but now the codeql workflow fails:
Exit code was 126 and last log line was:
/opt/hostedtoolcache/CodeQL/2.20.1/arm64/codeql/codeql: 142: /opt/hostedtoolcache/CodeQL/2.20.1/arm64/codeql/tools/linux64/java/bin/java: Exec format error.
Job run: https://github.com/hfhbd/kobol/actions/runs/12814883028/job/35732341338
CodeQL Setup:
name: "CodeQL"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
analyze:
name: Analyze
runs-on: ubuntu-24.04-arm
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: kotlin
build-mode: manual
- name: Build with Gradle
run: ./gradlew -Dorg.gradle.daemon=false --no-build-cache classes
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
👋 @hfhbd : as noted in CodeQL's system requirements, CodeQL is not compatible with Linux Arm. I would advise to keep the CodeQL workflow running on x86_64, even if you update other workflows to use Arm.
@redsun82 Thanks, but it is a little bit unexpected given the ARM support for macOS/Apple Silicon.
Also do you/GitHub plan to add a native feature for an action.yml to mention supported os and archs to get an error when GitHub evaluates the workflow file and check outs all action yml files? It could be incorporated into the immutable action that uses docker and its supported platform manifest entry 🤔