This repository has been archived by the owner on Dec 16, 2023. It is now read-only.
Bump docker/setup-qemu-action from 2 to 3 #54
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: | |
- '**' | |
tags: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: x64 | |
lib: lib64 | |
platform: linux/amd64 | |
- arch: ia32 | |
lib: lib | |
platform: linux/amd64 | |
- arch: arm64 | |
lib: lib64 | |
platform: linux/arm64 | |
- arch: arm | |
lib: lib | |
platform: linux/arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'sass/dart-sass' | |
ref: ${{ startsWith(github.ref, 'refs/tags/') && github.ref || '' }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
image: tonistiigi/binfmt:master # need qemu >= 7.0.0 | |
- name: Compile Protobuf | |
run: | | |
docker run --rm -i \ | |
--volume $PWD:$PWD \ | |
--workdir $PWD \ | |
docker.io/library/dart <<'EOF' | |
set -e | |
curl -fsSL "https://github.com/bufbuild/buf/releases/latest/download/buf-$(uname -s)-$(uname -m).tar.gz" | tar -xzC /usr/local --strip-components 1 | |
dart pub get | |
dart run grinder protobuf | |
EOF | |
- name: Build | |
run: | | |
docker run --rm -i \ | |
--platform ${{ matrix.platform }} \ | |
--privileged \ | |
--volume $PWD:$PWD \ | |
--workdir $PWD \ | |
ghcr.io/dart-android/dart <<'EOF' | |
set -e | |
export DART_SDK=/system/${{ matrix.lib }}/dart | |
export PATH=$DART_SDK/bin:$PATH | |
dart pub get | |
dart run grinder pkg-standalone-android-${{ matrix.arch }} | |
EOF | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-${{ matrix.arch }} | |
path: build/*.tar.gz | |
if-no-files-found: error | |
release: | |
name: Release | |
if: github.event.repository.fork == false && startsWith(github.ref, 'refs/tags/') | |
needs: [build] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-x64 | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-ia32 | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-arm64 | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-arm | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
*.tar.gz |