Skip to content

Add pip to MSYS2 install workflow #6

Add pip to MSYS2 install workflow

Add pip to MSYS2 install workflow #6

Workflow file for this run

name: 'build'
on:
push:
jobs:
build-msys2:
strategy:
fail-fast: false
matrix:
include:
- msystem: mingw64
env: x86_64
runner: windows-2022
- msystem: ucrt64
env: ucrt-x86_64
runner: windows-2022
# clang version 17.0.6
# Target: x86_64-w64-windows-gnu
# Thread model: posix
# D:/a/OpenFPGA/OpenFPGA/vtr-verilog-to-routing/libs/librrgraph/src/base/rr_graph_storage.cpp:425:10: note: in instantiation of function template specialization 'std::sort<edge_sort_iterator, edge_compare_dest_node>' requested here std::sort(
# C:/msys64/clang64/include/c++/v1/__algorithm/sort.h:647:5: error: indirection requires pointer operand ('const edge_sort_iterator' invalid)*__begin = _Ops::__iter_move(__pivot_pos);
# - msystem: clang64
# env: clang-x86_64
# runner: windows-2022
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: msys2 {0}
#shell: C:\msys64\msys2_shell.cmd -mingw64 -defterm -here -no-start {0}
steps:
- name: Cancel Previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout Repo
uses: actions/[email protected]
with:
submodules: recursive
fetch-depth: 0
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
path-type: minimal
update: true
release: false
install: >-
base-devel
git
wget
mingw-w64-${{ matrix.env }}-toolchain
mingw-w64-${{ matrix.env }}-cmake
mingw-w64-${{ matrix.env }}-tcl
mingw-w64-${{ matrix.env }}-zlib
mingw-w64-${{ matrix.env }}-swig
mingw-w64-${{ matrix.env }}-python
mingw-w64-${{ matrix.env }}-python-pip
- name: Install Dependencies
run: |
python3 -m pip install -r openfpga/requirements.txt
- name: Show Shell Configuration
run: |
which git && git --version || true
which cmake && cmake --version || true
which make && make --version || true
which python && python --version || true
which ninja && ninja --version || true
which tclsh && echo 'puts [info patchlevel];exit 0' | tclsh || true
- name: Print Compiler Info
run: |
printf "\n"
printf "$(which gcc)\n"
printf "$(gcc -v)\n"
printf "\n"
printf "$(which g++)\n"
printf "$(g++ -v)\n"
printf "\n"
printf "$(which ld)\n"
printf "$(ld -v)\n"
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Print Repo HEAD
run: |
echo && echo "git last log" && git log -1
# https://sourceforge.net/p/mingw/mailman/message/5690922/
# https://github.com/capnproto/capnproto/issues/1458
- name: Build
run: |
#
export SOURCE_DIR=${PWD}/openfpga
echo "SOURCE_DIR=${SOURCE_DIR}" >> $GITHUB_ENV
#
export COMMIT_SHA1=$(git -C ${SOURCE_DIR} rev-parse --short HEAD)
echo "COMMIT_SHA1=${COMMIT_SHA1}" >> $GITHUB_ENV
printf "COMMIT_SHA1=${COMMIT_SHA1}\n"
#
export BUILD_DIR=${SOURCE_DIR}/build
echo "BUILD_DIR=${BUILD_DIR}" >> $GITHUB_ENV
#
export INSTALL_DIR=${PWD}/install
echo "INSTALL_DIR=${INSTALL_DIR}" >> $GITHUB_ENV
#
make install -j$(nproc)
- name: Create Package
run: |
make package
- name: Upload OpenFPGA Package
uses: actions/[email protected]
if: ${{ success() }}
with:
name: openfpga-build-${{ env.COMMIT_SHA1 }}-${{ matrix.msystem }}
retention-days: 2
path: openfpga-${{ env.COMMIT_SHA1 }}-${{ matrix.msystem }}.7z
overwrite: true
build-linux:
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-20.04
install_script: install_dependencies_build_ubuntu2004.sh
- runner: ubuntu-22.04
install_script: install_dependencies_build_ubuntu2204.sh
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout Repo
uses: actions/[email protected]
with:
submodules: recursive
fetch-depth: 0
- name: Install Dependencies
run: |
sudo bash ./.github/workflows/${{ matrix.install_script }}
sudo python3 -m pip install -r ./.github/workflows/requirements.txt
- name: Show Shell Configuration
run: |
which git && git --version || true
which cmake && cmake --version || true
which make && make --version || true
which python && python --version || true
which ninja && ninja --version || true
which tclsh && echo 'puts [info patchlevel];exit 0' | tclsh || true
- name: Print Compiler Info
run: |
printf "\n"
printf "$(which gcc)\n"
printf "$(gcc -v)\n"
printf "\n"
printf "$(which g++)\n"
printf "$(g++ -v)\n"
printf "\n"
printf "$(which ld)\n"
printf "$(ld -v)\n"
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Print Repo HEAD
run: |
echo && echo "git last log" && git log -1
# https://sourceforge.net/p/mingw/mailman/message/5690922/
# https://github.com/capnproto/capnproto/issues/1458
- name: Build
run: |
#
export SOURCE_DIR=${PWD}/openfpga
echo "SOURCE_DIR=${SOURCE_DIR}" >> $GITHUB_ENV
#
export COMMIT_SHA1=$(git -C ${SOURCE_DIR} rev-parse --short HEAD)
echo "COMMIT_SHA1=${COMMIT_SHA1}" >> $GITHUB_ENV
printf "COMMIT_SHA1=${COMMIT_SHA1}"
#
export BUILD_DIR=${SOURCE_DIR}/build
echo "BUILD_DIR=${BUILD_DIR}" >> $GITHUB_ENV
#
export INSTALL_DIR=${PWD}/install
echo "INSTALL_DIR=${INSTALL_DIR}" >> $GITHUB_ENV
#
make install -j$(nproc)