[code] update to actions/upload-artifact@v2 (to try it) #289
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: CI Build | |
on: | |
push: | |
branches: [ master, dev_v2.1.2, dev_NXTFLASHER-*] | |
tags: | |
- '*' | |
jobs: | |
# netxfirmware: | |
# runs-on: ubuntu-latest | |
# container: ghcr.io/muhkuh-sys/mbs_ubuntu_2204_x86_64:latest | |
# steps: | |
# - name: Checkout repository | |
# # Use the old checkout v1 here. The newer v2 requires git 2.28 which is not available in the standard distribution. | |
# uses: actions/checkout@v1 | |
# with: | |
# submodules: recursive | |
# - name: Disable Git safe directory | |
# run: git config --system --add safe.directory '*' | |
# - name: Build netX firmware | |
# run: python3 mbs/mbs | |
# - name: Upload artifacts | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: targets | |
# path: targets | |
build: | |
# needs: netxfirmware | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- name: Ubuntu 18.04 x86 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_1804_x86:latest | |
distribution-id: ubuntu | |
distribution-version: "18.04" | |
cpu-architecture: x86 | |
- name: Ubuntu 18.04 x86_64 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_1804_x86_64:latest | |
distribution-id: ubuntu | |
distribution-version: "18.04" | |
cpu-architecture: x86_64 | |
- name: Ubuntu 18.04 arm64 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_1804_x86_64:latest | |
distribution-id: ubuntu | |
distribution-version: "18.04" | |
cpu-architecture: arm64 | |
- name: Ubuntu 20.04 x86 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_2004_x86:latest | |
distribution-id: ubuntu | |
distribution-version: "20.04" | |
cpu-architecture: x86 | |
- name: Ubuntu 20.04 x86_64 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_2004_x86_64:latest | |
distribution-id: ubuntu | |
distribution-version: "20.04" | |
cpu-architecture: x86_64 | |
- name: Ubuntu 20.04 arm64 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_2004_x86_64:latest | |
distribution-id: ubuntu | |
distribution-version: "20.04" | |
cpu-architecture: arm64 | |
- name: Ubuntu 22.04 x86_64 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_2204_x86_64:latest | |
distribution-id: ubuntu | |
distribution-version: "22.04" | |
cpu-architecture: x86_64 | |
- name: Ubuntu 22.04 armhf | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_2204_x86_64:latest | |
distribution-id: ubuntu | |
distribution-version: "22.04" | |
cpu-architecture: armhf | |
- name: Ubuntu 22.04 arm64 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_2204_x86_64:latest | |
distribution-id: ubuntu | |
distribution-version: "22.04" | |
cpu-architecture: arm64 | |
- name: Ubuntu 22.04 riscv64 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_2204_x86_64:latest | |
distribution-id: ubuntu | |
distribution-version: "22.04" | |
cpu-architecture: riscv64 | |
- name: Windows x86 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_2204_x86_64:latest | |
distribution-id: windows | |
distribution-version: "" | |
cpu-architecture: x86 | |
- name: Windows x86_64 | |
image: ghcr.io/muhkuh-sys/mbs_ubuntu_2204_x86_64:latest | |
distribution-id: windows | |
distribution-version: "" | |
cpu-architecture: x86_64 | |
container: ${{ matrix.platform.image }} | |
steps: | |
- name: Checkout repository | |
# Use the old checkout v1 here. The newer v2 requires git 2.28 which is not available in the standard distribution. | |
uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
- name: Disable Git safe directory | |
run: git config --system --add safe.directory '*' | |
# - name: Download firmware | |
# # Use the old download-artifact v1 here. The newer v2 does not work with 32bit containers. | |
# uses: actions/download-artifact@v1 | |
# with: | |
# name: targets | |
- name: Install pip and get dependencies for build script | |
run: apt update && apt install -y python3-pip && python3 -m pip install gitpython | |
- name: Build flasher | |
run: python3 build_artifact.py -m ${{ matrix.platform.distribution-id }} ${{ matrix.platform.distribution-version }} ${{ matrix.platform.cpu-architecture }} | |
- name: Upload artifacts | |
# Use the old upload-artifact v1 here. The newer v2 does not work with 32bit containers. | |
uses: actions/upload-artifact@v2 | |
with: | |
name: artifacts_${{ matrix.platform.distribution-id }}${{ matrix.platform.distribution-version }}_${{ matrix.platform.cpu-architecture }} | |
path: flasher-environment/build/artifacts |