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

Added CI artifacts for headless mode #260

Closed
wants to merge 1 commit into from
Closed
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
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,34 @@ jobs:
with:
name: manager_linux
path: convenient_test_manager.tar.gz

build_manager_headless_cli:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: subosito/flutter-action@v2
with:
channel: stable
architecture: x64

- name: Install dependencies
run: dart pub get
working-directory: packages/convenient_test_manager_dart

- name: Dart Compile
run: |
dart compile exe ./bin/convenient_test_manager_dart.dart -o manager_headless
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we can dart compile exe on ubuntu, mac, and windows (using the runs-on param). Then we can native executable for all three platforms :)

dart compile kernel ./bin/convenient_test_manager_dart.dart -o manager_headless_kernel
working-directory: packages/convenient_test_manager_dart

- uses: actions/upload-artifact@v3
with:
name: manager_linux-mac_headless_cli
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is only useable on linux, not on mac. This is probably because dart compile exe does not support cross compilation, and mac has different executable format than linux.

So maybe we should rename as sth like manager_headless_linux

e.g. the file, if executed on a mac, gives:

/Users/.../Downloads/manager_headless          
zsh: exec format error: /Users/.../Downloads/manager_headless

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a mac to test but I was going based off this comment: dart-lang/sdk#28617 (comment)

That user claims, ubuntu and mac should be cross compatible. I added in the kernel file so there is at least something that is cross compatible to all platforms. :)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Unfortunately it does not work according to my experiment.

path: packages/convenient_test_manager_dart/manager_headless

- uses: actions/upload-artifact@v3
with:
name: manager_headless_kernel
path: packages/convenient_test_manager_dart/manager_headless_kernel