aasdk/.github/workflows/build_compile.yml

52 lines
1.5 KiB
YAML

name: Build and test with docker
on: [ push, pull_request ]
jobs:
compile:
runs-on: ${{ matrix.host }}
strategy:
fail-fast: false
max-parallel: 3
matrix:
host: [
"ubuntu-latest",
#"macos-10.15",
]
config:
- {
name: "armhf Release",
arch: "armhf"
}
- {
name: "amd64 Release",
arch: "amd64"
}
name: 'Build and Upload release: ${{ matrix.config.name }}'
steps:
- uses: actions/checkout@v2
-
name: Build the Docker image
run: docker build -t aasdk_builder --file buildenv/Dockerfile .
-
name: 'Build ${{ matrix.config.arch }} Debian package'
run: docker run -v "${PWD}/release":/release aasdk_builder:latest ${{ matrix.config.arch }}
-
name: Get Name of Artifact
id: get-artifact-name
run: |
ls -hla
ARTIFACT_PATHNAME=$(ls ./release/*.deb | head -n 1)
ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME)
echo ::set-output name=artifact_filename::${ARTIFACT_NAME}
echo ::set-output name=artifact_path::${ARTIFACT_PATHNAME}
-
name: Upload build artifacts
id: upload_deploy
uses: actions/upload-artifact@v2
with:
name: ${{ steps.get-artifact-name.outputs.artifact_filename }}
path: |
${{ steps.get-artifact-name.outputs.artifact_path }}