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

RUNNER_ARCH and -self-hosted #2579

Open
derrik-fleming opened this issue Dec 18, 2024 · 3 comments · May be fixed by #2580
Open

RUNNER_ARCH and -self-hosted #2579

derrik-fleming opened this issue Dec 18, 2024 · 3 comments · May be fixed by #2580
Labels
kind/bug Something isn't working

Comments

@derrik-fleming
Copy link

derrik-fleming commented Dec 18, 2024

Bug report info

act --bug-report
act version:            0.2.68
GOOS:                   darwin
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
Config files:
        /Users/derrik.fleming/Library/Application Support/act/actrc:
                -P ubuntu-latest=node:16-buster-slim
                -P ubuntu-22.04=node:16-bullseye-slim
                -P ubuntu-20.04=node:16-buster-slim
                -P ubuntu-18.04=node:16-buster-slim
Build info:
        Go version:            go1.23.3
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -trimpath:            true
                DefaultGODEBUG:       asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1
                CGO_ENABLED:          1
                GOARCH:               amd64
                GOOS:                 darwin
                GOAMD64:              v1
Docker Engine:
        Engine version:        27.3.1
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    OrbStack
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             6.10.12-orbstack-00282-gd1783374c25e
        OS CPU:                16
        OS memory:             5981 MB
        Security options:
                name=seccomp,profile=builtin
                name=cgroupns

Command used with act

act -P macos-latest=-self-hosted --container-architecture=darwin/x86_64

Describe issue

Seems like the --container-architecture flag has no effect with -self-hosted.

I understand the name doesn't really make sense given that it's not running in a container when using the -self-hosted flag, so I'm not surprised that it doesn't work in the same way it would when running in a container. But I am making use of an Action in my Workflow that depends on the architecture, and when RUNNER_ARCH is set to the default amd64 the Action fails.

I'm looking for a way to be able set RUNNER_ARCH when using -self-hosted. I've tried setting it via --env and on my system, in both cases it seems like it gets overridden by Act.

Link to GitHub repository

No response

Workflow content

name: Build, analyze, format, test, check coverage

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:
    runs-on: macos-latest

    steps:
      - uses: actions/checkout@v4

      - uses: Atsumi3/actions-setup-fvm@0.0.3

      - uses:  kuhnroyal/flutter-fvm-config-action@v2
        id: fvm-config-action

      - uses: subosito/flutter-action@v2
        with:
          flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
          channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}

      - uses: bluefireteam/melos-action@v3

      - name: Install dependencies
        run: melos get

      - name: Activate coverde
        run: dart pub global activate coverde

      - name: Build
        run: melos build

      - name: Format
        run: melos format:ci

      - name: Analyze
        run: melos analyze

      - name: Test
        run: melos test

      - name: Coverage
        run: melos coverage

      - name: Check coverage
        run: melos check_coverage

      - name: Build iOS and Android apps
        run: melos build_apps

Relevant log output

[Build, analyze, format, test, check coverage/build] ⭐ Run Main Set action inputs
| Unable to determine Flutter version for channel: stable version: 3.24.3 architecture: amd64
[Build, analyze, format, test, check coverage/build]   ❌  Failure - Main Set action inputs
[Build, analyze, format, test, check coverage/build] exit status 1
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: PUB-CACHE-KEY=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: PUB-CACHE-PATH=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: CHANNEL=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: VERSION=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: ARCHITECTURE=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: CACHE-KEY=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: CACHE-PATH=
[Build, analyze, format, test, check coverage/build]   ❌  Failure - Main subosito/flutter-action@v2
[Build, analyze, format, test, check coverage/build] exit status 1
[Build, analyze, format, test, check coverage/build]   ❌  Failure - Main Atsumi3/actions-setup-fvm@0.0.3
[Build, analyze, format, test, check coverage/build] exit status 1

Additional information

No response

@derrik-fleming derrik-fleming added the kind/bug Something isn't working label Dec 18, 2024
@derrik-fleming derrik-fleming changed the title --container-architecture and -self-hosted RUNNER_ARCH and -self-hosted Dec 18, 2024
@ChristopherHX
Copy link
Contributor

Make a PR to map amd64 to x64?

Here is the code:

"x86_64": "X64",

  • get the go sdk
  • make the change and run go build if it works fork this repo and make a Pullrequest

@derrik-fleming
Copy link
Author

Happy to do so. Is there a case where amd64 is useful and the map you described would be undesirable?

I assumed amd64 was the default for a reason, but it wasn't immediately obvious to me why.

@derrik-fleming derrik-fleming linked a pull request Dec 19, 2024 that will close this issue
@ChristopherHX
Copy link
Contributor

Is there a case where amd64 is useful and the map you described would be undesirable?

I don't think such a case exist for act (for my github-act-runner this is a breaking change to document), all actions should expect X64

I assumed amd64 was the default for a reason

github-act-runner had used the raw values for all of them, but as usage in this upstream repo increased for officially supported platforms it has been requested to use the same values if they are documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants