name: 'push' on: push: pull_request: env: CI: true jobs: # # Format # fmt: runs-on: ubuntu-latest name: '馃悕 Format (black)' steps: - name: '馃О Checkout' uses: actions/checkout@v2 - name: '馃悕 Setup Python' uses: actions/setup-python@v2 with: python-version: 3.8 - run: python -m pip install black - run: python -m black --check python # # GPL # gpl: runs-on: ubuntu-latest name: '馃惂 GPL 路 mcode' steps: - name: '馃О Checkout' uses: actions/checkout@v2 - run: TASK=buster+mcode ./dist/ci-run.sh -c --gpl --no-synth # # GNU/Linux # lin: strategy: fail-fast: false max-parallel: 4 matrix: include: [ { os: 18, backend: mcode }, { os: 20, backend: mcode }, { os: 18, backend: llvm-5.0 }, { os: 20, backend: llvm-10 }, { os: 18, backend: gcc-8.3.0 }, { os: 20, backend: gcc-9.3.0 } ] name: '馃惂 Ubuntu ${{ matrix.os }} 路 ${{ matrix.backend }}' runs-on: ubuntu-${{ matrix.os }}.04 steps: - name: '馃О Checkout' uses: actions/checkout@v2 - name: Build and test GHDL in containers run: | TASK=ubuntu${{ matrix.os }}+${{ matrix.backend }} ./dist/ci-run.sh -c mv ghdl-*-ubuntu${{ matrix.os }}-*.tgz ghdl-gha-ubuntu-${{ matrix.os }}.04-$(echo ${{ matrix.backend }} | sed 's#-.*##g').tgz - name: '馃摛 Upload artifact: package' uses: actions/upload-artifact@v2 with: path: ghdl-gha-ubuntu-*.tgz # # MacOS # osx: runs-on: macOS-latest name: '馃崕 macOS 路 mcode' steps: - name: '馃О Checkout' uses: actions/checkout@v2 - name: '鈿欙笍 Dependencies (brew)' run: | brew update || true brew install p7zip ./dist/macosx/install-ada.sh - name: Build and test GHDL run: | PATH=$PWD/gnat/bin:$PATH ./dist/ci-run.sh -c env: TASK: macosx+mcode GITHUB_OS: ${{ runner.os }} # # Windows # win: runs-on: windows-latest strategy: fail-fast: false max-parallel: 2 matrix: include: [ {installs: "MINGW32", arch: i686, pkg: "mcode"}, #{installs: "MINGW32", arch: i686, pkg: "llvm"}, ! Not yet functional #{installs: "MINGW64", arch: x86_64, pkg: "mcode"}, ! mcode is not yet supported on win64 {installs: "MINGW64", arch: x86_64, pkg: "llvm"}, ] name: '馃煪 MSYS2 路 ${{ matrix.installs }} 路 ${{ matrix.pkg }}' env: MINGW_INSTALLS: ${{ matrix.installs }} defaults: run: shell: msys2 {0} steps: - name: '馃煪 Setup MSYS2' uses: msys2/setup-msys2@v2 with: msystem: MSYS update: true install: > base-devel git mingw-w64-${{ matrix.arch }}-toolchain mingw-w64-${{ matrix.arch }}-python-pip - run: git config --global core.autocrlf input shell: bash - name: '馃О Checkout' uses: actions/checkout@v2 with: # The command 'git describe' (used for version) needs the history. fetch-depth: 0 - name: Build package run: | cd dist/msys2-${{ matrix.pkg }} makepkg-mingw --noconfirm --noprogressbar -sCLf - name: Install package run: pacman --noconfirm -U dist/msys2-${{ matrix.pkg }}/mingw-w64-*-any.pkg.tar.zst - name: '馃摛 Upload artifact: builddir' uses: actions/upload-artifact@v2 with: name: ${{ matrix.installs }}-${{ matrix.pkg }}-builddir path: | ./dist/msys2-${{ matrix.pkg }}/src/ ./dist/msys2-${{ matrix.pkg }}/pkg/ - name: '馃摛 Upload artifact: package' uses: actions/upload-artifact@v2 with: path: ./dist/msys2-${{ matrix.pkg }}/mingw-*ghdl*.pkg.tar.zst - name: Test package run: | pip3 install -r testsuite/requirements.txt GHDL=ghdl ./testsuite/testsuite.sh env: MSYSTEM: ${{ matrix.installs }} # # NIGHTLY # nightly: if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' needs: [ lin, win ] runs-on: ubuntu-latest name: '馃摝 Nightly' steps: - name: '馃摜 Download artifacts' uses: actions/download-artifact@v2 - uses: eine/tip@master with: token: ${{ secrets.GITHUB_TOKEN }} tag: 'nightly' files: artifact/* - run: | curl -X POST https://api.github.com/repos/ghdl/docker/dispatches \ -H "Content-Type: application/json" \ -H 'Accept: application/vnd.github.everest-preview+json' \ -H "Authorization: token ${{ secrets.GHDL_BOT }}" \ --data '{"event_type": "ghdl"}' #--- # TODO: # - Cache # - 'gnat' directory in macOS job # # - Re-package a MINGW/MSYS2 package to provide a 'standalone' tarball/zipfile. # - https://github.com/ghdl/ghdl/issues/318#issuecomment-286246287 # # - Add GNAT GPL 32-bit build job with mcode backend