Merge pull request #16 from MillerTechnologyPeru/feature/swift-hello-… #152
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: Buildroot | |
on: [push] | |
jobs: | |
build: | |
name: Build Swift for Buildroot | |
strategy: | |
matrix: | |
arch: ["arm64", "armv7", "armv6", "armv5", "x86_64", "i386", "ppc64le"] | |
runs-on: ubuntu-latest | |
container: colemancda/buildroot-swift:swift_${{ matrix.arch }}_defconfig | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build | |
run: | | |
export SWIFT_BUILDROOT=$GITHUB_WORKSPACE | |
export SWIFT_TARGET_ARCH=${{ matrix.arch }} | |
$SWIFT_BUILDROOT/.devcontainer/build-scripts/download-buildroot.sh | |
$SWIFT_BUILDROOT/.devcontainer/build-scripts/build.sh | |
- name: Archive Build artifacts | |
uses: actions/[email protected] | |
with: | |
name: build-${{ matrix.arch }} | |
path: /workspaces/buildroot-swift/output/${{ matrix.arch }}/images/rootfs.tar | |
- name: Build Test | |
run: | | |
export SWIFT_BUILDROOT=$GITHUB_WORKSPACE | |
export SWIFT_TARGET_ARCH=${{ matrix.arch }} | |
$SWIFT_BUILDROOT/.devcontainer/build-scripts/build-test.sh | |
- name: Upload test binary | |
uses: actions/[email protected] | |
with: | |
name: swift-hello-${{ matrix.arch }} | |
path: /workspaces/buildroot-swift/output/${{ matrix.arch }}/target/usr/bin/swift-hello |