Does anyone feel like github actions is really slo...
# github-actions
c
Does anyone feel like github actions is really slow compared to other CIs? It’s great and all but all my docker builds are running slower in GH Actions.
r
do you use self-hosted or ubuntu-latest ?
c
Just ubuntu-latest. Do people commonly go for the self-hosted route?
r
for private repos, we use self-hosted to save on costs. we leverage self-hosted asg runners and self-hosted eks runners via summerwind action runner controller (ARC)
for public repos, we use ubuntu-latest
however, i personally haven’t noticed an issue with slow builds. Do you mean slow to start ? or slow to complete ?
c
Slow to complete, in my case just building a docker image.
yarn install
and
yarn build
is painfully slow. Like 30mins long before it finished 😒 CircleCI did it on 5mins
a
Sorry to bump so late but have you looked into yarn caching? Our heaviest projects take at most a minute after the first run
Example:
Copy code
- name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: |
          cd ${{ env.PACKAGE_NAME }}
          echo "::set-output name=dir::$(yarn cache dir)"

      - uses: actions/cache@v2
        id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
        with:
          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-
This is more related to the install step alone btw
c
Yeah i did which speeds it up. But inevitably sometimes the cache does not hit and it’s so painfully slow. I feel like it’s because of the default runners that github uses