Skip to content

Commit

Permalink
Setup environments on macOS and MSYS2 with GNAT.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Aug 5, 2024
1 parent 23f0dab commit 027f6b1
Showing 1 changed file with 66 additions and 56 deletions.
122 changes: 66 additions & 56 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,58 +13,58 @@ jobs:
with:
name: pyEDAA.CLITool

CompileUbuntu:
name: Compile GHDL on Ubuntu 2024.04 (LTS)
runs-on: "ubuntu-24.04"

strategy:
fail-fast: false
matrix:
backend: [mcode, llvm]

defaults:
run:
shell: bash

steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
with:
repository: ghdl/ghdl

- name: 🔧 Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gcc g++ gnat
- name: "llvm - 🔧 Install dependencies for LLVM backend"
if: matrix.backend == 'llvm'
run: sudo apt-get install -y --no-install-recommends llvm clang

- name: Prepare build environemnt
run: mkdir -p build/${{ matrix.backend }}

- name: mcode - Configure
if: matrix.backend == 'mcode'
run: |
cd build/${{ matrix.backend }}
../../configure --prefix=/opt/ghdl-${{ matrix.backend }}
- name: llvm - Configure
if: matrix.backend == 'llvm'
run: |
cd build/${{ matrix.backend }}
../../configure --prefix=/opt/ghdl-${{ matrix.backend }} --with-llvm-config
- name: Make
run: |
cd build/${{ matrix.backend }}
make
- name: Install
run: |
cd build/${{ matrix.backend }}
sudo make install
# CompileUbuntu:
# name: Compile GHDL on Ubuntu 2024.04 (LTS)
# runs-on: "ubuntu-24.04"
#
# strategy:
# fail-fast: false
# matrix:
# backend: [mcode, llvm]
#
# defaults:
# run:
# shell: bash
#
# steps:
# - name: ⏬ Checkout repository
# uses: actions/checkout@v4
# with:
# repository: ghdl/ghdl
#
# - name: 🔧 Install dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends gcc g++ gnat
#
# - name: "llvm - 🔧 Install dependencies for LLVM backend"
# if: matrix.backend == 'llvm'
# run: sudo apt-get install -y --no-install-recommends llvm clang
#
# - name: Prepare build environemnt
# run: mkdir -p build/${{ matrix.backend }}
#
# - name: mcode - Configure
# if: matrix.backend == 'mcode'
# run: |
# cd build/${{ matrix.backend }}
# ../../configure --prefix=/opt/ghdl-${{ matrix.backend }}
#
# - name: llvm - Configure
# if: matrix.backend == 'llvm'
# run: |
# cd build/${{ matrix.backend }}
# ../../configure --prefix=/opt/ghdl-${{ matrix.backend }} --with-llvm-config
#
# - name: Make
# run: |
# cd build/${{ matrix.backend }}
# make
#
# - name: Install
# run: |
# cd build/${{ matrix.backend }}
# sudo make install

CompileMacOS:
name: Compile GHDL on macOS 14 (arm64)
Expand All @@ -87,7 +87,7 @@ jobs:
- name: Install dependencies
run: |
brew install llvm
brew install zst
brew install zstd
echo "LLVM_BINARY_PATH=$(brew --prefix llvm)/bin" >> $GITHUB_ENV
- name: Install GNAT
Expand Down Expand Up @@ -125,6 +125,11 @@ jobs:
run: |
cd build/${{ matrix.backend }}
echo $PATH
echo -n "which gnat:" && which gnat
$(which gnat) --version
echo -n "which gnatmake:" && which gnatmake
$(which gnatmake) --version
echo "which llvm-config: $(which llvm-config) ($($(which llvm-config) --version))"
../../configure --prefix=/opt/ghdl-${{ matrix.backend }}
- name: llvm - Configure
Expand All @@ -148,7 +153,7 @@ jobs:
runs-on: windows-latest

env:
common_packages: gcc gcc-ada
common_packages: gcc gcc-ada diffutils
mcode_packages: ""
llvm_packages: llvm clang

Expand All @@ -160,7 +165,7 @@ jobs:

defaults:
run:
shell: bash
shell: "msys2 {0}"

steps:
- name: '🟦 Setup MSYS2 for ${{ matrix.runtime }}'
Expand All @@ -175,6 +180,11 @@ jobs:
with:
repository: ghdl/ghdl

- name: Check build environemnt
run: |
which gnat && $(which gnat) --version
which gnatmake && $(which gnatmake) --version
- name: Prepare build environemnt
run: mkdir -p build/${{ matrix.backend }}

Expand Down Expand Up @@ -204,7 +214,7 @@ jobs:
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev
needs:
- UnitTestingParams
- CompileUbuntu
# - CompileUbuntu
- CompileMacOS
- CompileWindows
with:
Expand Down

0 comments on commit 027f6b1

Please sign in to comment.