Skip to content

Commit

Permalink
Merge pull request #93 from amutake/fix/release-branch-saphe-multi-pl…
Browse files Browse the repository at this point in the history
…atform

Fix multi-platform build for release-branch-saphe
  • Loading branch information
amutake authored Jan 19, 2024
2 parents f5c039f + 354661b commit 6854c52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/release-branch-saphe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,18 @@ on:
default: "dev-0-1-0-separate-saphe-from-satysfi"

jobs:
build:
release:
runs-on: ubuntu-latest
strategy:
matrix:
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@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-branch-${{ github.event.inputs.branch }}-${{ matrix.platform }}-${{ github.sha }}
key: ${{ runner.os }}-buildx-branch-${{ github.event.inputs.branch }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-branch-${{ github.event.inputs.branch }}-${{ matrix.platform }}-
${{ runner.os }}-buildx-branch-${{ github.event.inputs.branch }}-
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
Expand All @@ -39,22 +34,14 @@ jobs:
with:
context: branch-saphe
file: branch-saphe/Dockerfile
push: false
load: true
push: true
tags: amutake/satysfi:${{ steps.args.outputs.image_tag }}
build-args: |
BUILD_DATE=${{ steps.args.outputs.date }}
VERSION=${{ steps.args.outputs.version }}
REVISION=${{ steps.args.outputs.revision }}
BRANCH=${{ github.event.inputs.branch }}
IMAGE_TAG=${{ steps.args.outputs.image_tag }}
platforms: ${{ matrix.platform }}
platforms: linux/amd64,linux/arm64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
# run tests
- run: docker run --rm amutake/satysfi:${{ steps.args.outputs.image_tag }} satysfi --help
- run: docker run --rm amutake/satysfi:${{ steps.args.outputs.image_tag }} saphe --help
- run: git clone --branch ${{ github.event.inputs.branch }} https://github.com/gfngfn/SATySFi.git
- run: docker run --rm -v $(pwd)/SATySFi/demo:/satysfi amutake/satysfi:${{ steps.args.outputs.image_tag }} sh -c "saphe solve demo.saty && saphe build demo.saty"
# push
- run: docker push amutake/satysfi:${{ steps.args.outputs.image_tag }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
echo "date=$(date --iso-8601=seconds)" >> $GITHUB_OUTPUT
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
echo "revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
release:
needs: info
runs-on: ubuntu-latest
Expand Down

0 comments on commit 6854c52

Please sign in to comment.