NES MLIR builder #10
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: NES MLIR builder | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-x64-linux: | |
timeout-minutes: 360 | |
env: | |
VCPKG_DEP_LIST: x64-linux | |
VCPKG_FEATURE_FLAGS: -binarycaching | |
runs-on: [self-hosted, linux, X64, dep-builder] | |
strategy: | |
fail-fast: false | |
matrix: | |
osversion: [ubuntu-22.04] | |
steps: | |
- uses: AutoModality/action-clean@v1 | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Set output vars to the actual tag name | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Build Docker | |
id: builddocker | |
working-directory: ${{ github.workspace }}/docker/ | |
run: docker build -t nes_mlir_build_${{ matrix.osversion }} -f Dockerfile-${{ matrix.osversion }} . | |
- name: Build MLIR | |
id: installdeps | |
run: | | |
docker run -v ${{ github.workspace }}:/build_dir --rm nes_mlir_build_${{ matrix.osversion }} \ | |
./build_dir/build_ubuntu-x64.sh | |
- name: Compress artifacts | |
id: compressdeps | |
run: | | |
7z a mlir-18.1.0-${{ matrix.osversion }}-X64.7z mlir -mx9 -aoa | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
id: createrelease | |
with: | |
files: | | |
mlir-18.1.0-${{ matrix.osversion }}-X64.7z | |
- name: Clean build artifacts | |
id: cleanbuildartifacts | |
if: always() | |
run: | | |
rm -rf llvm-project | |
rm -rf .git | |
rm -rf mlir | |
- name: Remove docker image | |
id: removedockerimage | |
if: always() | |
run: | | |
test -n "$(docker image ls -q nes_mlir_build_${{ matrix.osversion }})" && \ | |
docker image rm $(docker image ls -q nes_mlir_build_${{ matrix.osversion }}) || \ | |
true | |
build-arm-linux: | |
env: | |
VCPKG_DEP_LIST: arm64-linux | |
VCPKG_FEATURE_FLAGS: -binarycaching | |
runs-on: [self-hosted, linux, ARM64, dep-builder] | |
strategy: | |
matrix: | |
osversion: [ubuntu-18.04] | |
steps: | |
- uses: AutoModality/action-clean@v1 | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Set output vars to the actual tag name | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Build Docker | |
id: builddocker | |
working-directory: ${{ github.workspace }}/docker/ | |
run: docker build -t nes_mlir_build_${{ matrix.osversion }} -f Dockerfile-${{ matrix.osversion }} . | |
- name: Build MLIR | |
id: installdeps | |
run: | | |
docker run -v ${{ github.workspace }}:/build_dir --rm nes_mlir_build_${{ matrix.osversion }} \ | |
./build_dir/build_ubuntu-arm64.sh | |
- name: Compress artifacts | |
id: compressdeps | |
run: | | |
7z a mlir-18.1.0-${{ matrix.osversion }}-arm64.7z mlir -mx9 -aoa | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
id: createrelease | |
with: | |
files: | | |
mlir-18.1.0-${{ matrix.osversion }}-arm64.7z | |
- name: Clean build artifacts | |
id: cleanbuildartifacts | |
if: always() | |
run: | | |
rm -rf mlir | |
rm -rf llvm-project | |
rm -rf .git | |
- name: Remove docker image | |
id: removedockerimage | |
if: always() | |
run: | | |
test -n "$(docker image ls -q nes_mlir_build_${{ matrix.osversion }})" && \ | |
docker image rm $(docker image ls -q nes_mlir_build_${{ matrix.osversion }}) || \ | |
true | |
build-arm-osx: | |
timeout-minutes: 360 | |
env: | |
VCPKG_DEP_LIST: arm64-osx | |
VCPKG_FEATURE_FLAGS: -binarycaching | |
runs-on: [self-hosted, macos, ARM64] | |
steps: | |
- uses: lukka/get-cmake@latest | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Set output vars to the actual tag name | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Build OSX ARM MLIR | |
id: buildmlir | |
run: | | |
${{ github.workspace }}/build_osx-arm64.sh | |
shell: bash | |
- name: Compress artifacts | |
id: compressdeps | |
run: | | |
7z a mlir-18.1.0-osx-arm64.7z mlir -mx9 -aoa | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
id: createrelease | |
with: | |
files: | | |
mlir-18.1.0-osx-arm64.7z | |
- name: Clean build artifacts | |
id: cleanbuildartifacts | |
if: always() | |
run: | | |
rm -rf mlir | |
build-x64-osx: | |
timeout-minutes: 360 | |
env: | |
VCPKG_DEP_LIST: x64-osx | |
VCPKG_FEATURE_FLAGS: -binarycaching | |
runs-on: [ self-hosted, macos, X64, dep-builder ] | |
steps: | |
- uses: lukka/get-cmake@latest | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Set output vars to the actual tag name | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Build OSX x64 MLIR | |
id: buildmlir | |
run: | | |
${{ github.workspace }}/build_osx-x64.sh | |
shell: bash | |
- name: Compress artifacts | |
id: compressdeps | |
run: | | |
7z a mlir-18.1.0-osx-x64.7z mlir -mx9 -aoa | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
id: createrelease | |
with: | |
files: | | |
mlir-18.1.0-osx-x64.7z | |
- name: Clean build artifacts | |
id: cleanbuildartifacts | |
if: always() | |
run: | | |
rm -rf mlir |