# ARM Your GitHub Actions

![Cost-Effective Github Actions. This is a short article that covers: | by  Vishnu Deva | Medium](https://miro.medium.com/v2/resize:fit:900/0*AohySn45UIt-1lwu.png align="left")

Who doesn't love **Github Actions**? *We can't even live without them anymore!*

Perfect in any way, and essentially free to use, they only have a limitation: They are **x86 only** and offer **no native ARM64 support** - *if not through super-slow emulation.*

For [chDB](https://chdb.dev) this is *quite a limitation* since our build process is **heavy and demanding!**

<mark>How can we build native ARM64 binaries without QEMU and with no extra costs?</mark>

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689623496572/150fcffc-9f49-46be-b885-d8509e40a355.png align="left")

**Hello, Oracle.** Now, I'm not their biggest fan but respect where it's due:

Their ***"<mark>Always-Free”</mark>*** Oracle Cloud tier generously allows running [ARM Ampere A1](https://www.oracle.com/cloud/compute/arm/) instances with 3,000 CPU hours and 18,000 GB hours per month, which affords exactly 4 CPUs and 24GB of RAM with a ~100GB of storage volume. *For free. Forever.*

*.... what's next is obvious!*

### Grab a **FREE AMPERE ARM64** Instance

First, sign up to **Oracle Cloud** to gain access to their **Always-Free** Tier.

Once ready, jump to the **Compute** section and **Create a New Instance**

![Compute section](https://www.2uo.de/Computing/setting-up-a-free-server-in-oracle-cloud-menu-compute.png align="left")

Next, modify the parameters in the **Image and Shape** section by clicking **Edit**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689622339753/a493b7dc-f1af-42ec-8290-ccdf44b69b96.png align="center")

From the options, choose an **AMPERE** shape, and *max out the resources*:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689622117494/8170ca40-c872-4943-98f2-768848ebdb6b.png align="center")

*A few more clicks and you're ready to go. Refer to the Oracle docs for more options!*

<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text"><strong><mark>Do NOT forget to download the generated keys for SSH access!</mark></strong></div>
</div>

### Configure **ARM64** Self-Hosted Runner

It's time to use our instance for our self-hosted runner using your **GitHub** account:

**Always make sure to use the latest instructions!** For reference, here's the procedure:

```bash
sudo apt-get install gcc libz-dev build-essential
mkdir actions-runner && cd actions-runner
curl -o actions-runner-linux-arm64-2.296.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.296.1/actions-runner-linux-arm64-2.296.1.tar.gz
echo "ce11e5d9c1cc299bd8a197b7807f6146fbe7494abb19765fb04664afbdb3755e  actions-runner-linux-arm64-2.296.1.tar.gz" | shasum -a 256 -c
tar xzf ./actions-runner-linux-arm64-2.296.1.tar.gz
./config.sh --url https://github.com/your-org/your-repo --token your-token
./run.sh
```

<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">Labels are super important! Make sure the <strong>ARM64 </strong>label is included!</div>
</div>

If you want to run your **Runner as a service**, use the following extra commands:

```bash
sudo ./svc.sh install
sudo ./svc.sh start
sudo ./svc.sh status
```

Once the setup procedure is complete, your **Action Runner** should be **ready**!

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689621793764/b168f949-6de9-4954-bc46-729e775c554f.png align="center")

### Public Repositories

If your repository is **public** you'll need to enable the following option:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689621751795/4e31a7e0-6655-4c89-8dd3-f5b746c73fe0.png align="center")

# 💀 WARNING

<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text"><a target="_blank" rel="noopener noreferrer nofollow" href="https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners" style="pointer-events: none">Adding self-hosted runners</a> is super simple <em>but quite insecure!</em> so you might want to limit the scope of your runner to a specific repository at first!</div>
</div>

<mark>Your Actions will run </mark> **<mark>ON THE INSTANCE</mark>**<mark>. Not Docker. Every step will be </mark> **<mark>VERY </mark>** <mark>real!</mark>

### It's Action Time!

It's time to configure our **Action** to use our **ARM64 self-hosted runner**:

```bash
jobs:
  build_arm64_linux:
    runs-on:
    - self-hosted
    - ARM64
```

# 👍 That's it!

Simple and powerful. *Enjoy your fast, native & free ARM64 builds!*
