diff --git a/.github/test.sh b/.github/test.sh index 402ddd6..af67c7b 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -4,14 +4,24 @@ set -e cd $(dirname "$0")/.. -run_sim() { +case "$1" in + sim) + true + ;; + *) + echo "Unknown test suite '$1'" + exit 1 + ;; +esac + +run_task() { echo "::group::Test $1" - cd "$1"/sim/vhdl - $MAKE sim + cd "$1"/"$2"/vhdl + $MAKE "$2" cd ../../.. echo '::endgroup::' } for item in aes cbcdes cbcmac_des cbctdes ctraes des tdes; do - run_sim $item + run_task "$item" "$1" done diff --git a/.github/workflows/test.yml b/.github/workflows/simulation.yml similarity index 52% rename from .github/workflows/test.yml rename to .github/workflows/simulation.yml index aa591a3..a7ef041 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/simulation.yml @@ -1,4 +1,4 @@ -name: 'test' +name: 'Simulation' on: push: @@ -9,34 +9,49 @@ jobs: lin: runs-on: ubuntu-latest + name: '🐧 Ubuntu 20.04' steps: - - uses: actions/checkout@v2 + - name: '🧰 Checkout' + uses: actions/checkout@v2 with: submodules: recursive - - name: Install dependencies + - name: '⚙️ Install dependencies' run: | sudo apt update -qq sudo apt install -y libssl-dev - - uses: ghdl/setup-ghdl-ci@master + - name: '🔧 Setup GHDL' + uses: ghdl/setup-ghdl-ci@master with: backend: llvm - - run: ./.github/test.sh + - name: '▶️ Test' + run: ./.github/test.sh sim env: MAKE: make win: runs-on: windows-latest + name: '🟪 MSYS2 MINGW64' defaults: run: shell: msys2 {0} steps: - - uses: msys2/setup-msys2@v2 + - name: '⚙️ git config autocrlf' + run: git config --global core.autocrlf input + shell: bash + + - name: '🧰 Checkout' + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: '🟪 Setup MSYS2' + uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true @@ -45,13 +60,7 @@ jobs: mingw-w64-x86_64-ghdl-llvm mingw-w64-x86_64-openssl - - run: git config --global core.autocrlf input - shell: bash - - - uses: actions/checkout@v2 - with: - submodules: recursive - - - run: ./.github/test.sh + - name: '▶️ Test' + run: ./.github/test.sh sim env: MAKE: mingw32-make diff --git a/README.md b/README.md index 5a54cf8..9b0345e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -[![simulation](https://github.com/tmeissner/cryptocores/workflows/test/badge.svg?branch=master)](https://github.com/tmeissner/cryptocores/actions?query=workflow%3Atest) +
# cryptocores Cryptography IP-cores & tests written in VHDL / Verilog