remove nvcc_ld_3v3 from GROUP_SOC #43
Workflow file for this run
This file contains hidden or 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: BCU CI | |
| on: | |
| push: | |
| tags: | |
| - 'bcu_*' | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| configuration: [Release] | |
| platform: ['x64'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| # Checkout code | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Initialize the sub-module | |
| - name: Initialize submodules | |
| run: git submodule update --init | |
| # Install dependencies and build | |
| - name: Build with Ubuntu 20.04 Docker | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| echo $CI_BUILD_VERSION | |
| # Use Docker to build in Ubuntu 20.04 environment | |
| docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace -e CI_BUILD_VERSION="$CI_BUILD_VERSION" -e DEBIAN_FRONTEND=noninteractive -e TZ=UTC ubuntu:20.04 bash -c " | |
| apt-get update && | |
| apt-get install -y libyaml-dev libftdi1-dev libusb-1.0-0-dev libncurses5-dev cmake build-essential pkg-config git && | |
| git config --global --add safe.directory /workspace && | |
| cmake . && | |
| make | |
| " | |
| # The built binary should already be named 'bcu' for Linux | |
| - name: Install dependencies (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew update | |
| brew install pkgconfig libyaml libftdi libusb | |
| pkg-config --list-all | |
| - name: Create env variables (Linux/macOS) | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| echo "CI_BUILD_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV | |
| - name: Create env variables (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| echo "CI_BUILD_VERSION=${{ github.ref_name }}" >> $env:GITHUB_ENV | |
| - name: Build (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| echo $CI_BUILD_VERSION | |
| # Use pkg-config from homebrew | |
| export PKG_CONFIG_PATH="$(brew --prefix)/lib/pkgconfig:$PKG_CONFIG_PATH" | |
| cmake . | |
| make | |
| # Rename the binary for macOS | |
| if [ -f "bcu" ]; then | |
| mv bcu bcu_mac | |
| fi | |
| # Windows build | |
| - name: Windows setup selection | |
| uses: microsoft/setup-msbuild@v1.1 | |
| if: matrix.os == 'windows-latest' | |
| - name: Build step2 (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| echo $env.CI_BUILD_VERSION | |
| msbuild /p:Configuration=${{ matrix.configuration }} /p:PlatformToolset=v143 /p:Platform=${{ matrix.platform }} Board_Control_Utilities.sln | |
| - name: Copy Board_Control_Utilities.exe to bcu.exe | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| if (Test-Path "${{ github.workspace }}\x64\Release\Board_Control_Utilities.exe") { | |
| Copy-Item "${{ github.workspace }}\x64\Release\Board_Control_Utilities.exe" "${{ github.workspace }}\bcu.exe" | |
| } | |
| # Upload build artifacts | |
| - name: Upload artifact (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bcu-artifacts-${{ github.run_id }}-${{ matrix.os }} | |
| path: ${{ github.workspace }}/bcu | |
| - name: Upload artifact (macOS) | |
| if: matrix.os == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bcu-artifacts-${{ github.run_id }}-${{ matrix.os }} | |
| path: ${{ github.workspace }}/bcu_mac | |
| - name: Upload artifact (Windows) | |
| if: matrix.os == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bcu-artifacts-${{ github.run_id }}-${{ matrix.os }} | |
| path: ${{ github.workspace }}/bcu.exe | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Check out the code | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Download build artifacts for all OS | |
| - name: Download artifacts (Ubuntu) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bcu-artifacts-${{ github.run_id }}-ubuntu-latest | |
| path: artifacts/ubuntu-latest | |
| - name: Download artifacts (macOS) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bcu-artifacts-${{ github.run_id }}-macos-latest | |
| path: artifacts/macos-latest | |
| - name: Download artifacts (Windows) | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bcu-artifacts-${{ github.run_id }}-windows-latest | |
| path: artifacts/windows-latest | |
| # GitHub Releases | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| release_name: Prebuild for ${{ github.ref_name }} | |
| body: | | |
| Prebuild for commit ${{ github.sha }} | |
| Commit message: ${{ github.event.head_commit.message }} | |
| draft: true | |
| files: | | |
| artifacts/ubuntu-latest/bcu | |
| artifacts/macos-latest/bcu_mac | |
| artifacts/windows-latest/bcu.exe | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |