JTAG state machine #771
Workflow file for this run
This file contains 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: Test | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
doc: | |
runs-on: ubuntu-latest | |
name: 'π Docs' | |
steps: | |
- name: 'π§° Checkout' | |
uses: actions/checkout@v2 | |
- name: 'π BuildTheDocs (BTD)' | |
uses: buildthedocs/btd@v0 | |
with: | |
token: ${{ github.token }} | |
skip-deploy: ${{ github.event_name == 'pull_request' }} | |
- name: 'π§Ή Clean HTML build' | |
if: ${{ github.event_name != 'pull_request' }} | |
run: sudo rm -rf doc/_build/html/.git | |
- name: 'π€ Upload artifact: HTML' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: openFPGALoader-Documentation | |
path: doc/_build/html | |
lin-build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- 20 | |
- 22 | |
name: 'π§π§ Ubuntu ${{ matrix.os }} | build' | |
runs-on: ubuntu-${{ matrix.os }}.04 | |
steps: | |
- name: 'π§° Checkout' | |
uses: actions/checkout@v2 | |
- name: 'βοΈ Install dependencies' | |
run: | | |
sudo apt update -qq | |
sudo apt install -y \ | |
cmake \ | |
gzip \ | |
libftdi1-2 \ | |
libftdi1-dev \ | |
libhidapi-hidraw0 \ | |
libhidapi-dev \ | |
libudev-dev \ | |
pkg-config \ | |
tree \ | |
zlib1g-dev | |
- name: 'π§ Build tarball' | |
run: | | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . | |
make DESTDIR=$(pwd)/dist install | |
_rulesdir='dist/etc/udev/rules.d/' | |
mkdir -p "${_rulesdir}" | |
cp ../99-openfpgaloader.rules "${_rulesdir}" | |
_licenses="dist/usr/local/share/licenses/openFPGALoader" | |
mkdir -p "${_licenses}" | |
install -m 644 ../LICENSE "${_licenses}" | |
tar -cvzf ../ubtuntu${{ matrix.os }}.04-openFPGALoader.tgz -C dist . | |
- name: 'π€ Upload artifact: tarball' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ubtuntu${{ matrix.os }}.04-openFPGALoader | |
path: ubtuntu${{ matrix.os }}.04-openFPGALoader.tgz | |
- name: 'π Show package content' | |
run: | | |
mkdir tmp | |
cd tmp | |
tar -xf ../ubtuntu${{ matrix.os }}.04-openFPGALoader.tgz | |
tree . | |
mac-build: | |
strategy: | |
fail-fast: false | |
name: 'π§π§ macOS latest | build' | |
runs-on: macos-latest | |
steps: | |
- name: 'π§° Checkout' | |
uses: actions/checkout@v2 | |
- name: 'βοΈ Install dependencies' | |
run: | | |
brew update | |
brew install --only-dependencies openFPGALoader | |
- name: 'π§ Build tarball' | |
run: | | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . | |
lin-test: | |
needs: lin-build | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- 20 | |
- 22 | |
name: 'π¦π§ Ubuntu ${{ matrix.os }} | test' | |
runs-on: ubuntu-${{ matrix.os }}.04 | |
steps: | |
- name: 'βοΈ Install dependencies' | |
run: | | |
sudo apt update -qq | |
sudo apt install -y \ | |
libftdi1-2 \ | |
libhidapi-hidraw0 \ | |
udev \ | |
zlib1g | |
- name: 'π₯ Download artifact: package' | |
uses: actions/download-artifact@v2 | |
with: | |
name: ubtuntu${{ matrix.os }}.04-openFPGALoader | |
- name: 'π οΈ Install package' | |
run: sudo tar -xvzf *.tgz -C / | |
- name: 'π¦ Test package' | |
run: | | |
openFPGALoader --help | |
openFPGALoader --detect || true | |
win-jobs: | |
name: β¬ Generate list of MSYS2 jobs | |
runs-on: ubuntu-latest | |
outputs: | |
jobs: ${{ steps.matrix.outputs.jobs }} | |
steps: | |
- id: matrix | |
uses: msys2/setup-msys2/matrix@main | |
with: | |
systems: >- | |
mingw32 | |
mingw64 | |
ucrt64 | |
clang64 | |
win: | |
needs: win-jobs | |
uses: msys2/setup-msys2/.github/workflows/PKGBUILD.yml@main | |
with: | |
name: openFPGALoader | |
matrix: ${{ needs.win-jobs.outputs.jobs }} | |
path: scripts/msys2 | |
test: | | |
uname -a | |
which openFPGALoader | |
openFPGALoader --help | |
openFPGALoader --detect || true | |
Release: | |
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/tags/')) | |
needs: [ lin-test, win ] | |
runs-on: ubuntu-latest | |
name: 'π¦ Release' | |
steps: | |
- name: 'π₯ Download artifacts' | |
uses: actions/download-artifact@v2 | |
with: | |
path: artifact | |
- name: 'βοΈ Package Documentation' | |
run: | | |
cd artifact | |
tar cvzf openFPGALoader-Documentation.tar.gz openFPGALoader-Documentation | |
rm -rf openFPGALoader-Documentation | |
# Tagged: create a pre-release or a release (semver) | |
# Untagged: update the assets of pre-release 'nightly' | |
- uses: pyTooling/Actions/releaser@r0 | |
with: | |
token: ${{ github.token }} | |
tag: 'nightly' | |
files: artifact/**/* |