Add branch-saphe
context
#298
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
context: [., slim, opam-slim, branch] | |
platform: | |
- linux/amd64 | |
# - linux/arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ matrix.context }}-${{ matrix.platform }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx-${{ matrix.context }}-${{ matrix.platform }}- | |
- id: args | |
run: | | |
echo "date=$(date --iso-8601=seconds)" >> $GITHUB_OUTPUT | |
echo "revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- uses: docker/build-push-action@v5 | |
with: | |
context: ${{ matrix.context }} | |
file: ${{ matrix.context }}/Dockerfile | |
push: false | |
load: true | |
tags: amutake/satysfi:ci | |
build-args: | | |
BUILD_DATE=${{ steps.args.outputs.date }} | |
VERSION=ci | |
REVISION=${{ steps.args.outputs.revision }} | |
# only 'branch' context | |
BRANCH=master | |
IMAGE_TAG=ci | |
platforms: ${{ matrix.platform }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
# the size represents uncompressed. see https://gist.github.com/MichaelSimons/fb588539dcefd9b5fdf45ba04c302db6 | |
- run: docker images | |
# run tests | |
- run: docker run --rm amutake/satysfi:ci satysfi --help | |
- run: docker run --rm amutake/satysfi:ci satyrographos help | |
- run: docker run --rm -v $(pwd)/tests:/satysfi amutake/satysfi:ci satysfi minimum.saty | |
- run: docker run --rm -v $(pwd)/tests:/satysfi amutake/satysfi:ci satysfi with-dist.saty | |
- run: docker run --rm -v $(pwd)/tests:/satysfi amutake/satysfi:ci sh -c "opam install satysfi-base --ignore-constraints-on=satysfi && satyrographos install && satysfi with-base.saty" | |
if: ${{ matrix.context == '.' || matrix.context == 'opam-slim' }} |