Giter Club home page Giter Club logo

action's People

Contributors

adamsmd avatar epsilon-0 avatar jacob-carlborg avatar mhuijgen avatar ncruces avatar peniqliotuv avatar scribam avatar slackadays avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

action's Issues

The FreeBSD 13.0 bulid does not work

Downloading disk image: https://github.com/cross-platform-actions/freebsd-builder/releases/download/v0.2.0/freebsd-13-x86-64.qcow2
Downloading hypervisor: https://github.com/cross-platform-actions/resources/releases/download/v0.3.1/xhyve-macos.tar
Downloading resources: https://github.com/cross-platform-actions/resources/releases/download/v0.3.1/resources-macos.tar
/usr/sbin/mkfile -n 40m /tmp/resourcesNeMLJA/res.raw
/usr/bin/ssh-keygen -t ed25519 -f /tmp/resourcesNeMLJA/id_ed25519 -q -N 
Error: Unexpected HTTP response: 404

The problem is the name of the downloaded disk image:
freebsd-13-x86-64.qcow2 vs.
freebsd-13.0-x86-64.qcow2

https://github.com/gansm/finalcut/runs/4493630197?check_suite_focus=true

Maybe this can solve your problem:

var version = 13.0;
encodeURIComponent(version.toFixed(1));

Nondeterministic failures

I'm trying to use this with microsoft/snmalloc#588, but each run seems to have a high chance of one of the jobs failing by hitting the timeout. The output looks as if it's just disconnecting. Is it possible that the ssh connection is dropped under high load? Would it be possible to run dtach in the VMs and reconnect if the session is dropped?

Add Haiku support

It would also be great if CPA supported Haiku which is a new Unix-like desktop OS based off BeOS which is like Linux's proprietary cousin. Now that Clipboard supports Haiku, there isn't any one good way to do Haiku CI/CD to verify builds/tests.

Ok, this is the last one of these requests from me :)

Using custom images?

Can we use user provided QEMU qcow2 files? Currently the action only has OpenBSD 6.9 available, I have a setup which generates OpenBSD current images on a weekly basis and I want to be able to use those for the action.

Is this possible or supported?

Thanks!

Why does it need macos and can't run on Linux/qemu?

Hey.

it's a great effort and many thanks for this work. But while trying to search for a freebsd github action that is not requiring macos for virtualbox but rather Linux with qemu I seem to be out of luck.

I start to wonder why it has to be macos/virtualbox. Isn't qemu (/linux) sufficient? I'm primarily intersted in this because macos costs 10 times the money (or minutes) as standard linux does on github actions pricing.

Many thanks,
Christian.

Ability to print timings of the various steps performed

I'm using this action to run tests of https://github.com/inko-lang/inko on FreeBSD. What I'm seeing is build times in the order of 15-20 minutes, even though the tests only run for about 5-10 minutes. Looking at the output it's not really clear where time is being spent, though I have a suspicion the syncing of files is taking up most of the time.

Is there a way to have the action print timings of the individual steps performed? That might help narrow down where the time is being spent. 😃

NetBSD - very slow network (IPv6 timeouts?)

I have tried to use cross-platform-actions to run NetBSD and I have noticed that when I use for example pkg_add or pkgin it takes virtually forever to complete.

After some googling I have found that there is some problem with IPv6, QEMU ticket here:

Is this something that cross-platform-actions could help with and give an option to workaround? I would not mind having ipv6 disabled in the VM if there was such option to do so. The problem is that it's almost unusable at the moment to even install a C++ compiler on such a runner.

I have also tried another project that provides NetBSD and it runs pretty well, although it uses a different virtualization software (virtualbox on macos only):

Thanks a lot for these actions btw!

Moonshot: Add Android Termux support

It turns out that there is no single easy way to compile Android apps in Termux in GHA*. However, it's possible to have an Android VM and a Termux SSH session. This should fit well into CPA if it's possible to have such a setup. Having the ability to have an Android action would let me have nightly builds for Clipboard to verify Android compatibility.

*excluding the possibility of a self hosted runner on some Android box
Edit: Looks like GHA requires .net Core, so self hosted on Termux is currently out until termux/termux-packages#516 is satisfied. One alternative would be to have a regular GH Action SSH into the runner server and run the command there, so maybe that would be more viable for you to implement here?

Double edit: Self hosted has nothing to do with CPA

No NetBSD support

I am looking for a GitHub action build environment with NetBSD. It would be really great if this could be added to your portfolio.

Using ::group:: to distinguish between steps?

At the moment when a VM is run, there is a lot of messages, which are then combined with messages produced by the run script. GH actions provides a way how to group these messages by using ::group:: prefix during logging.

My question is whether it would be possible to use such groups to make the run script output easier to find. I have added a small screenshot from a workflow run where the content in the red rectangle is the actual code that runs in the VM (basically the content I'm most interested in), whereas all the output outside is from VM init/shutdown.

I would not mind having this feature optional, behind a flag, for example.

image

Add support for Linux running on a different architecture?

At the moment it's possible to select a variety of BSDs, but it would be very useful to be able to run Linux, but on a non-x86 architecture (like ARM64). Because if I use just GHA offered runners and cross-platform-actions, the only possibility to test ARM64 is basically OpenBSD on ARM64.

Feel free to close if this is not planned.

Add OpenIndiana support

This is basically the same as #19, but for OpenIndiana instead. OI comes from the Solaris branch of the BSD family, and is somewhat similar to the other BSDs except for the Solaris special sauce features that it's built up over the years.

Error in /home/runner/.ssh/config

Since December 8, GitHub Action for FreeBSD, NetBSD, and OpenBSD no longer work for me. On December 7, everything was still working. Looks to me like an empty variable.

I receive the following output:

Run cross-platform-actions/[email protected]
  with:
    operating_system: freebsd
    version: 13.0
    shell: bash
    run: uname -a
  freebsd-version
  whoami
  pwd
  sudo env IGNORE_OSVERSION=yes pkg update -f
  sudo pkg install -y lang/gcc devel/autotools autotools automake autoconf autoconf-archive libtool pkgconf devel/ncurses devel/cppunit cppunit
  g++ --version
  autoreconf -v --install --force
  ./configure --prefix=/usr
  make -j10

Downloading disk image: https://github.com/cross-platform-actions/freebsd-builder/releases/download/v0.2.0/freebsd-13.0-x86-64.qcow2
Downloading hypervisor: https://github.com/cross-platform-actions/resources/releases/download/v0.5.0/qemu-system-x86_64-linux.tar
Downloading resources: https://github.com/cross-platform-actions/resources/releases/download/v0.5.0/resources-linux.tar
/usr/bin/truncate -s 40m /tmp/resourcescgpR6b/res.raw
/usr/bin/ssh-keygen -t ed25519 -f /tmp/resourcescgpR6b/id_ed25519 -q -N 
/usr/sbin/fdisk /tmp/resourcescgpR6b/res.raw

Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x470d6395.

Command (m for help): Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (1-4, default 1): First sector (2048-81919, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-81919, default 81919): 
Created a new partition 1 of type 'Linux' and of size 39 MiB.

Command (m for help): The partition table has been altered.
Syncing disks.

/usr/bin/sudo losetup -f --show --offset 1048576 --sizelimit 40894464 /tmp/resourcescgpR6b/res.raw
/dev/loop3
/usr/bin/sudo mkfs.fat -F32 /dev/loop3
mkfs.fat 4.2 (2021-01-31)
/usr/bin/sudo mount -o uid=1001 /dev/loop3 /tmp/resourcescgpR6b/mount/RES
/usr/bin/sudo umount /tmp/resourcescgpR6b/mount/RES
/usr/bin/sudo losetup -d /dev/loop3
Downloaded file: /home/runner/work/_temp/c11061fd-0c62-4b61-ae04-33b9bd68ec75
Downloaded file: /home/runner/work/_temp/374c6c8c-59d9-4690-a6a9-69bfbe9053c1
Downloaded file: /home/runner/work/_temp/0d035091-a74d-4037-b5f2-f0bb3f4dff28
Unarchiving hypervisor: /home/runner/work/_temp/374c6c8c-59d9-4690-a6a9-69bfbe9053c1
Unarchiving resources: /home/runner/work/_temp/c11061fd-0c62-4b61-ae04-33b9bd68ec75
/usr/bin/tar -x --warning=no-unknown-keyword -C /home/runner/work/_temp/2bb90f00-e8b9-49e6-93ee-1384c6f1d076 -f /home/runner/work/_temp/374c6c8c-59d9-4690-a6a9-69bfbe9053c1
/usr/bin/tar -x --warning=no-unknown-keyword -C /home/runner/work/_temp/6eea3f1c-0469-4779-b6fa-79ca4ae9b0e4 -f /home/runner/work/_temp/c11061fd-0c62-4b61-ae04-33b9bd68ec75
/home/runner/work/_temp/6eea3f1c-0469-4779-b6fa-79ca4ae9b0e4/qemu-img convert -f qcow2 -O raw /home/runner/work/_temp/0d035091-a74d-4037-b5f2-f0bb3f4dff28 /home/runner/work/_temp/6eea3f1c-0469-4779-b6fa-79ca4ae9b0e4/disk.raw
Initializing VM
Booting VM   
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
Waiting for VM to be ready...
Executing command inside VM: true
/usr/bin/ssh -t runner@localhost
Terminating VM
/home/runner/.ssh/config line 6: no argument after keyword "sendenv"
/home/runner/.ssh/config: terminating, 1 bad configuration options
/usr/bin/sudo kill -s TERM 1766
Error: write EPIPE
Error: The operation was canceled.

Increase memory in VM

Hi, I'm evaluating the use of this action for running CI for https://github.com/crystal-lang/crystal on FreeBSD. But the memory limit of 4GB restricts that (see https://github.com/crystal-lang/crystal/actions/runs/3943057224/jobs/6747446954).

I understand this is just an arbitrary limit. The runner has more to spare.

Would it be possible to make the memory setting configurable?

Perhaps it could also automatically delegate (almost) all memory available in the runner environment by default.

Disable or configure verbose rsync

Thank you for your project!

I have a feature request. I would like to have rsync verbose mode (-v) turned off by default or by configuration.

The verbose option is added here:

action/src/action/action.ts

Lines 221 to 240 in cad4964

private async syncFiles(
ipAddress: string,
...excludePaths: string[]
): Promise<void> {
core.debug(`Syncing files to VM, excluding: ${excludePaths}`)
// prettier-ignore
await exec.exec('rsync', [
'-auvzrtopg',
'--exclude', '_actions/cross-platform-actions/action',
...flatMap(excludePaths, p => ['--exclude', p]),
`${this.workDirectory}/`,
`runner@${ipAddress}:work`
])
}
private async syncBack(ipAddress: string): Promise<void> {
core.info('Syncing back files')
// prettier-ignore
await exec.exec('rsync', [
'-uvzrtopg',

With my project I have 16,000 verbose lines added at the beginning of the step. Here is an example (look at the "Test in VirtualBox" step:

https://github.com/diskuv/dkml-c-probe/actions/runs/2449053587

In the example you will see openbsd 6.9 disabled because the VirtualBox OpenBSD 6.9 image is missing some important syspatches. That problem is not part of this issue

Missing QEMU dependency glib

When using this GitHub action it fails with the following error:

/Users/runner/work/_temp/4405623e-c81f-4b1f-ba5a-dc9a08fcf5d9/qemu-img convert -f qcow2 -O raw /Users/runner/work/_temp/78c78e7e-dd85-4427-a068-f16fea5fd041 /Users/runner/work/_temp/4405623e-c81f-4b1f-ba5a-dc9a08fcf5d9/disk.raw
dyld: Library not loaded: /usr/local/opt/glib/lib/libglib-2.0.0.dylib
  Referenced from: /Users/runner/work/_temp/4405623e-c81f-4b1f-ba5a-dc9a08fcf5d9/qemu-img
  Reason: image not found

The reason seems to be that GitHub has remove libglib from its macOS runners.

Add DragonFlyBSD support

I'm interested in CPA supporting all the popular BSDs. However, DragonFlyBSD is one that isn't supported yet. I'd like for us to be able to easily build software for DragonFly automatically, so it makes sense that CPA should support it.

Also, I think this action is one of the coolest things on GitHub 🚀 since the alternative is a bunch of bespoke hacks.

No output until a job has finished

For different jobs I see slightly different behaviour, either no output until the job has finished or only the lines that have been emitted while watching the job are shown. I have one NetBSD run that has gone for 16 minutes so far without producing any output and I have no idea if it's broken or just slow (it's the only QEMU one - is it using the KVM accelerator or just emulated mode? If it's the latter, that would explain it).

Allow separating build steps

It would be nice to create the VM on the first step and then be able to reuse it for different steps so that we can see whether we failed in build, test, or whatever stages from the dashboard, rather than having to read the ouput.

Can't install packages in FreeBSD

I'm trying to use this action for Free/Open/NetBSD builds for Clipboard (https://github.com/Slackadays/Clipboard). However, the prerequisites for FreeBSD are GCC 10/11/12 and CMake. I can't install these packages with pkg because the user isn't root, and I can't get root with su because the user isn't in the right group. Would it be possible to fix this? Currently if I can't install these packages then this action is incompatible with Clipboard. The same issue might be present in Open/NetBSD but I haven't checked those out yet. :)

Add Fuchsia support

Fuchsia is a new and upcoming microkernel OS from Google that might be replacing Android in the future. It would be so great if CPA had this available to build with, but it could be a while before this is feasible as Fuchsia uses a bunch of bespoke Googler-specific tools and is a huge pain to get going.

Temporary fix for failing to sync files

I have a problem where, occasionally, the runner cannot sync the files before exiting the emulator. The job seems to work fine, it is just this issue.

As a temporary fix (as I know that this is already reported as an issue in #29), I would like to indicate to the runner that some steps was completed, and that a timeout and error is fine. I did this by setting

  my-freebsd-job:
    name: FreeBSD
    runs-on: macos-latest
    steps:
      - uses: cross-platform-actions/[email protected]
        timeout-minutes: 25
        continue-on-error: true
        # Create some files if successful
      - name: "next step"
        # Check if the files exist

However, if it did time out, the runner will not find the files, regardless of whether it was successful or not. I have also tried to set output variables via echo "myvar=true" >> $GITHUB_OUTPUT, but that should also save the variables to a file, so it should also not work.

Perhaps cross-platform-actions/action works inside another directory? Perhaps these files exists, just that they are in another directory? If so, what is its path?

Add architecture alias for x86-64: x64

When using act or self-hosted runners, the host could be aarch64, at which point the cost of the additional virtualization to the default x86_64 architecture is not worth it for someone trying to test if a project builds on a given OS, without caring about the specific architecture.

Also, I've tried a few options to set it explicitly to $RUNNER_ARCH, but for some reason none of them work, even though I can echo the variable just fine:

architecture: $RUNNER_ARCH
architecture: ${{ env.RUNNER_ARCH }}
architecture: ${{ format('{0}', env.RUNNER_ARCH) }}

Any ideas?

SSH host port collision

The SSH host port is hardcoded to 2847, which prevents starting multiple instances of this action on the same host (e.g. when using the act tool).

Configuration option for CPU count

The number of CPUs is currently hard-coded to two. But runners can have more cores (GitHub hosted macOS runners have 3, for example).

This setting should be configurable to allow using more cores in the guest system, like with memory size (#16).
Potentially with autodetection of available cores as default.

v0.6.1 only works if debug mode is enabled

Continues #11.

I tried v0.6.1 and it now only works if I have debug mode enabled:

Syncing back files
/usr/bin/rsync -uzrtopg  [email protected]:work/ /Users/runner/work
rsync: link_stat "/Users/runner/work/dkml-c-probe/dkml-c-probe/[email protected]:work/." failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
Terminating VM
/usr/bin/sudo kill -s TERM 1469

I think it is because with an empty syncVerboseFlag:

action/src/action/action.ts

Lines 225 to 227 in 52ad2be

private get syncVerboseFlag(): string {
return core.isDebug() ? '-v' : ''
}

in

action/src/action/action.ts

Lines 235 to 242 in 52ad2be

await exec.exec('rsync', [
'-auzrtopg',
this.syncVerboseFlag,
'--exclude', '_actions/cross-platform-actions/action',
...flatMap(excludePaths, p => ['--exclude', p]),
`${this.workDirectory}/`,
`runner@${ipAddress}:work`
])

you would get the second argument (this.syncVerboseFlag) as an empty string.

rsync will see the empty string and try to sync that.

Originally posted by @jonahbeckford in #11 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.