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

Handle universal and aarch64 targets #243

Closed
andr-ec opened this issue Mar 17, 2022 · 0 comments · Fixed by #301
Closed

Handle universal and aarch64 targets #243

andr-ec opened this issue Mar 17, 2022 · 0 comments · Fixed by #301

Comments

@andr-ec
Copy link

andr-ec commented Mar 17, 2022

I can currently build for aarch64 targets by using a self-hosted action runner on an apple silicone mac.
The problem is that all the paths aren't automatically recognized:

2022-03-17T18:01:22.2682550Z    Finished 2 bundles at:
2022-03-17T18:01:22.2683610Z         /Users/user/actions-runner/_work/project/project/target/release/bundle/macos/Project.app
2022-03-17T18:01:22.2700850Z         /Users/user/actions-runner/_work/project/project/target/release/bundle/dmg/Project_0.1.21_aarch64.dmg
2022-03-17T18:01:22.2701870Z [vite-plugin-tauri]  Tauri build finished.
2022-03-17T18:01:22.3124470Z Expected artifacts paths:
2022-03-17T18:01:22.3225410Z /Users/user/actions-runner/_work/project/project/target/release/bundle/dmg/Project_0.1.21_x64.dmg
2022-03-17T18:01:22.3248440Z /Users/user/actions-runner/_work/project/project/target/release/bundle/macos/Project.app
2022-03-17T18:01:22.3255780Z /Users/user/actions-runner/_work/project/project/target/release/bundle/macos/Project.app.tar.gz
2022-03-17T18:01:22.3258900Z /Users/user/actions-runner/_work/project/project/target/release/bundle/macos/Project.app.tar.gz.sig
2022-03-17T18:01:22.3260130Z Artifacts: /Users/user/actions-runner/_work/project/project/target/release/bundle/macos/Project.app.
2022-03-17T18:01:22.6631630Z Found release with tag 0.1.21.
2022-03-17T18:01:22.6632090Z 
2022-03-17T18:01:22.6665300Z 
2022-03-17T18:01:22.6669470Z 
2022-03-17T18:01:22.6671720Z running tar [
2022-03-17T18:01:22.6672460Z   'czf',
2022-03-17T18:01:22.6673430Z   '/Users/user/actions-runner/_work/project/project/target/release/bundle/macos/Project.app.tar.gz',
2022-03-17T18:01:22.6674240Z   '-C',
2022-03-17T18:01:22.6675050Z   '/Users/user/actions-runner/_work/project/project/target/release/bundle/macos',
2022-03-17T18:01:22.6675810Z   'Project.app'
2022-03-17T18:01:22.6676340Z ]

In this case only Project.app is recognized but Project_0.1.21_aarch64.dmg is ignored because aarch64 doesn't match process.arch
used in the code here:

`bundle/dmg/${fileAppName}_${app.version}_${process.arch}.dmg`

Similarly I can build universal apps:

     with:
        args: -- --target universal-apple-darwin

But the problem here is that tauri-action doesn't recognize any of the artifacts because they don't match the expected path names

2022-03-17T20:20:45.3165570Z  Finished 2 bundles at:
2022-03-17T20:20:45.3167070Z         /Users/user/actions-runner/_work/myproject/myproject/target/universal-apple-darwin/release/bundle/macos/Project.app
2022-03-17T20:20:45.3168430Z         /Users/user/actions-runner/_work/myproject/myproject/target/universal-apple-darwin/release/bundle/dmg/Project_0.1.21_universal.dmg
2022-03-17T20:20:45.3189960Z [vite-plugin-tauri]  Tauri build finished.
2022-03-17T20:20:45.3616230Z Expected artifacts paths:
2022-03-17T20:20:45.3617800Z /Users/user/actions-runner/_work/myproject/myproject/target/release/bundle/dmg/Project_0.1.21_x64.dmg
2022-03-17T20:20:45.3619020Z /Users/user/actions-runner/_work/myproject/myproject/target/release/bundle/macos/Project.app
2022-03-17T20:20:45.3620360Z /Users/user/actions-runner/_work/myproject/myproject/target/release/bundle/macos/Project.app.tar.gz
2022-03-17T20:20:45.3621590Z /Users/user/actions-runner/_work/myproject/myproject/target/release/bundle/macos/Project.app.tar.gz.sig
2022-03-17T20:20:45.3657480Z [error]No artifacts were found.

specifically /target/universal-apple-darwin/release/bundle/macos/ doesn't match /target/release/bundle/macos/

Possible solutions:

  • add an environment variable/parameter for arch and then fall back on process.arch if not defined and add universal-apple-darwin, x86_64-apple-darwin, aarch64-apple-darwin as a possible path to look for artifacts.
  • add environment variables/parameters for the full path of each of the artifacts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant