Skip to content

Replace ansible setup for Ubuntu with devcontainers #9

Replace ansible setup for Ubuntu with devcontainers

Replace ansible setup for Ubuntu with devcontainers #9

Workflow file for this run

name: Ubuntu CI
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
branches: ["main"]
tags:
- "**"
pull_request:
branches: ["main"]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./actions/detect-package-metadata
id: metadata
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: devcontainers/[email protected]
with:
imageName: ghcr.io/mull-project/internal-linux-ci
configFile: ./.devcontainer/ubuntu_20.04_12/devcontainer.json
push: always # TODO: remove
runCmd: |
cmake --preset mull -DMULL_VERSION=${{ steps.metadata.outputs.version }}${{ steps.metadata.outputs.suffix }}
cmake --workflow --preset build-and-test
cmake --workflow --preset package
ls ./build.dir/
./end2end-tests/run_end2end_tests.sh 12
- name: Publish package
shell: bash
run: |
pwd
ls
ls build.dir
- uses: devcontainers/[email protected]
if: env.CLOUDSMITH_API_KEY != null
with:
imageName: ghcr.io/mull-project/internal-linux-ci
configFile: ./.devcontainer/ubuntu_20.04_12/devcontainer.json
push: never
runCmd: |
UBUNTU_CODENAME=$(. /etc/os-release; echo "${UBUNTU_CODENAME/*, /}")
env CLOUDSMITH_API_KEY=${{ secrets.CLOUDSMITH_API_KEY }} cloudsmith push deb \
mull-project/mull-${{ steps.metadata.outputs.channel }}/ubuntu/${UBUNTU_CODENAME} \
build.dir/*.deb
# jobs:
# ubuntu:
# name: Ubuntu ${{ matrix.UBUNTU_VERSION }} LLVM ${{ matrix.LLVM_VERSION }}
# runs-on: ubuntu-latest
# container: ubuntu:${{ matrix.UBUNTU_VERSION }}
# strategy:
# matrix:
# UBUNTU_VERSION: ["22.04", "24.04"]
# LLVM_VERSION: [14, 15]
# include:
# - UBUNTU_VERSION: "20.04"
# LLVM_VERSION: 12
# - UBUNTU_VERSION: "22.04"
# LLVM_VERISON: 13
# - UBUNTU_VERSION: "24.04"
# LLVM_VERSION: 16
# - UBUNTU_VERSION: "24.04"
# LLVM_VERSION: 17
# env:
# DEBIAN_FRONTEND: noninteractive
# # Necessary for Ubuntu 24.04 since PEP 668
# PIP_BREAK_SYSTEM_PACKAGES: 1
# steps:
# - name: Debugging
# run: |
# env | sort
# cat $GITHUB_EVENT_PATH
# - name: Install software
# run: |
# apt-get update && apt-get install --no-install-recommends -y python3-pip curl libunwind8
# pip3 install ansible
# - name: Add git ppa
# i f: matrix.UBUNTU_VERSION != '24.04'
# run: |
# apt-get update && apt-get install --no-install-recommends -y gpg-agent software-properties-common
# add-apt-repository ppa:git-core/ppa
# - name: Install git
# run: |
# apt-get update && apt-get install --no-install-recommends -y git
# git config --global --add safe.directory $PWD
# - name: Checkout sources
# uses: actions/checkout@v3
# with:
# submodules: true
# - uses: ./actions/detect-package-metadata
# id: metadata
# - name: Run CI task
# run: |
# cd infrastructure && \
# ansible-playbook ubuntu-playbook.yaml \
# -e llvm_version="${{ matrix.LLVM_VERSION }}" \
# -e source_dir=$PWD/.. \
# -e gitref=$GITHUB_SHA \
# -e host=localhost \
# -e mull_version=${{ steps.metadata.outputs.version }}${{ steps.metadata.outputs.suffix }} \
# --verbose
# - name: Publish package
# if: env.CLOUDSMITH_API_KEY != null
# shell: bash
# run: |
# UBUNTU_CODENAME=$(. /etc/os-release; echo "${UBUNTU_CODENAME/*, /}")
# cloudsmith push deb \
# mull-project/mull-${{ steps.metadata.outputs.channel }}/ubuntu/${UBUNTU_CODENAME} \
# infrastructure/packages/`cat infrastructure/PACKAGE_FILE_NAME`.deb
# - name: Move package
# run: |
# mkdir -p /tmp/packages
# mv infrastructure/packages/`cat infrastructure/PACKAGE_FILE_NAME`.deb /tmp/packages/`cat infrastructure/PACKAGE_FILE_NAME`.deb
# - uses: ./actions/attach-package
# with:
# GH_API_KEY: ${{ secrets.GITHUB_TOKEN }}