Skip to content

.github: Update actions to current versions #216

.github: Update actions to current versions

.github: Update actions to current versions #216

Workflow file for this run

name: snek
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
IMAGE_FILE: dockerimg.tar
IMAGE: snek
HASH_FILE: snek/.github/Dockerfile
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: 'Clone snek'
uses: actions/checkout@v4
with:
path: snek
- name: Check for Docker Image
id: cache
uses: actions/cache@v4
with:
path: ${{ env.IMAGE_FILE }}
key: ${{ env.IMAGE_FILE }}-${{ hashFiles( env.HASH_FILE ) }}
- name: Set up Docker build
if: steps.cache.outputs.cache-hit != 'true'
uses: docker/setup-buildx-action@v3
- name: Build snek container
if: steps.cache.outputs.cache-hit != 'true'
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
file: .github/Dockerfile
tags: ${{ env.IMAGE }}:latest
outputs: type=docker,dest=${{ env.IMAGE_FILE }}
- name: Load Docker image
run: |
docker load -i $IMAGE_FILE
docker images -a $IMAGE
- name: 'Create install destinationn'
run: |
mkdir `pwd`/artifacts
- name: 'Build snek'
run: |
docker run --rm \
--mount type=bind,source=`pwd`/artifacts,destination=/artifacts \
snek \
make DESTDIR=/artifacts PREFIX=/opt/snek SNEK_OTHEROS=1 SNEK_RISCV_TEST=1 black check install install-otheros
- name: 'Upload results'
uses: actions/upload-artifact@v4
with:
name: snek
path: artifacts