feat(*): add XSD generator and validate
command
#5
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: Build & Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
linux: | |
name: Build (Linux) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup asdf | |
uses: asdf-vm/actions/setup@v3 | |
- name: Cache asdf | |
id: cache-asdf | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/home/runner/.asdf | |
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }} | |
restore-keys: | | |
${{ runner.os }}-asdf- | |
- name: Install dependencies in .tool-versions | |
if: steps.cache-asdf.outputs.cache-hit != 'true' | |
run: | | |
asdf plugin add golang | |
asdf plugin add goreleaser | |
asdf plugin add just | |
asdf plugin add flatc | |
asdf install golang | |
asdf install flatc | |
asdf install goreleaser | |
asdf install just | |
- name: Install system dependencies | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install gcc-aarch64-linux-gnu libxml2-dev | |
- name: Run build | |
run: just build-all --id linux | |
- uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: code | |
path: /home/runner/work/odict | |
darwin: | |
name: Build (Darwin) | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup asdf | |
uses: asdf-vm/actions/setup@v2 | |
- name: Cache asdf | |
id: cache-asdf | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/home/runner/.asdf | |
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }} | |
restore-keys: | | |
${{ runner.os }}-asdf- | |
- name: Install dependencies in .tool-versions | |
run: asdf install go goreleaser just | |
- name: Run build | |
run: just build-all --id darwin | |
- uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: code | |
path: /home/runner/work/odict | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup asdf | |
uses: asdf-vm/actions/setup@v2 | |
- name: Cache asdf | |
id: cache-asdf | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/home/runner/.asdf | |
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }} | |
restore-keys: | | |
${{ runner.os }}-asdf- | |
- name: Cache Poetry dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/home/runner/.venv | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/python/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry- | |
- name: Install dependencies in .tool-versions | |
uses: asdf-vm/actions/install@v2 | |
- name: Run tests | |
env: | |
POETRY_VIRTUALENVS_IN_PROJECT: true | |
run: just test | |
- uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: code | |
path: /home/runner/work/odict |