Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/conan_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
python-version: "3.11"

- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip

- name: Cache Conan
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.conan
key: ${{ runner.os }}-conan
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/container_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Archive CD

on:
push:
tags:
- 'v*' # Trigger on version tags like v1.2.3

jobs:
build:
runs-on: ubuntu-latest
container:
image: ubuntu:22.04 # Base container for building

env:
PROJECT_NAME: fossil-test
BUILD_DIR: builddir
DIST_DIR: dist
GHCR_IMAGE: ghcr.io/${{ github.repository_owner }}/fossil-test:latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install dependencies
run: |
apt update
apt install -y python3 python3-pip meson ninja-build build-essential curl docker.io git
pip3 install --upgrade pip

- name: Set up Meson build
run: |
meson setup $BUILD_DIR

- name: Compile project
run: meson compile -C $BUILD_DIR

- name: Generate source archives
run: |
meson dist -C $BUILD_DIR --formats xztar,bztar,gztar,zip
mkdir -p $DIST_DIR
cp $BUILD_DIR/meson-dist/* $DIST_DIR/

- name: List archives
run: ls -l $DIST_DIR

- name: Build Docker image
run: |
# Dockerfile should be in repo root
docker build -t $GHCR_IMAGE .

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push Docker image
run: docker push $GHCR_IMAGE

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: source-archives
path: $DIST_DIR/
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Base image
FROM ubuntu:22.04

# Install build dependencies
RUN apt-get update && apt-get install -y \
python3 python3-pip meson ninja-build build-essential git curl \
&& rm -rf /var/lib/apt/lists/*

# Set workdir
WORKDIR /app

# Copy source code
COPY . /app

# Build project
RUN meson setup builddir && meson compile -C builddir

# Copy dist archives into container
RUN mkdir -p /dist && cp builddir/meson-dist/* /dist/

# Default command (optional)
CMD ["bash"]
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,33 @@ To get started with Pizza Test, ensure you have the following installed:

### Adding Dependency

#### Adding via Meson WrapDB
#### Adding via Meson Git Wrap

Meson can install packages directly from the WrapDB just like so, newest versions by default.

```bash
meson wrap install fossil-test
```
To add a git-wrap, place a `.wrap` file in `subprojects` with the Git repo URL and revision, then use `dependency('fossil-test')` in `meson.build` so Meson can fetch and build it automatically.

#### Adding via Conan GitHub repository

Conan can install packages directly from a GitHub repository if it contains a valid conanfile.py.
Conan can install packages directly from a GitHub repository if it contains a valid `conanfile.py`.

```bash
conan install git+https://github.com/fossillogic/fossil-test.git#v1.2.8 --name pizza_test --build=missing
```

#### Integrate the Dependency:
In your `meson.build` file, integrate Fossil Test by adding the following line:

```meson
dep = dependency('fossil-test')
Add the `fossil-test.wrap` file in your `subprojects` directory and include the following content:

```ini
[wrap-git]
url = https://github.com/fossillogic/fossil-test.git
revision = v1.2.8

[provide]
dependency_names = fossil-test, pizza-test
```

In your `meson.build` file, integrate Fossil Test by adding the following line:

**Note**: For the best experience, always use the latest release of Pizza Test. Visit the [Pizza Test Releases](https://github.com/fossillogic/fossil-test/releases) page for the latest versions.

## Configure Build Options
Expand Down
Loading