refactor: reorganize sources, update ci/devcontainer, formatting, lin… #133
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: CI | |
on: [push] | |
jobs: | |
build: | |
name: Build/Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Restore ccache | |
uses: actions/cache/restore@v4 | |
with: | |
path: ccache | |
key: ccache- | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup missing directories and files on the runner | |
run: | | |
mkdir -p ~/.ssh | |
touch ~/.gitconfig | |
- name: Prepare container | |
uses: devcontainers/ci@v0.3 | |
with: | |
imageName: opendeck # Local name only | |
imageTag: latest # Local tag only | |
push: never | |
- name: Build library | |
uses: devcontainers/ci@v0.3 | |
with: | |
imageName: opendeck | |
imageTag: latest | |
push: never | |
runCmd: | | |
make | |
- name: Save ccache | |
uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: ccache | |
key: "ccache-${{ github.run_id }}" | |
format: | |
name: Code formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup missing directories and files on the runner | |
run: | | |
mkdir -p ~/.ssh | |
touch ~/.gitconfig | |
- name: Prepare container | |
uses: devcontainers/ci@v0.3 | |
with: | |
imageName: opendeck # Local name only | |
imageTag: latest # Local tag only | |
push: never | |
- name: Check formatting | |
uses: devcontainers/ci@v0.3 | |
with: | |
imageName: opendeck | |
imageTag: latest | |
push: never | |
runCmd: | | |
make format | |
lint: | |
name: Code linting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup missing directories and files on the runner | |
run: | | |
mkdir -p ~/.ssh | |
touch ~/.gitconfig | |
- name: Prepare container | |
uses: devcontainers/ci@v0.3 | |
with: | |
imageName: opendeck # Local name only | |
imageTag: latest # Local tag only | |
push: never | |
- name: Lint | |
uses: devcontainers/ci@v0.3 | |
with: | |
imageName: opendeck | |
imageTag: latest | |
push: never | |
runCmd: | | |
make lint |