Fix array_equal to use a natural sort. #300
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/CD" | |
# Controls when the action will run. Triggers the workflow on push or pull request events but only for the master branch | |
on: | |
push: | |
branches-ignore: | |
- 'main' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# GLobal environment variables | |
env: | |
COLOR_DEBUG: "dim blue" | |
COLUMNS: 120 | |
EFUNCS_COLOR: 1 | |
EINTERACTIVE: 1 | |
EPROGRESS_DELAY: 15 | |
EPROGRESS_INLINE: 0 | |
EPROGRESS_SPINNER: 0 | |
REGISTRY: "ghcr.io" | |
TERM: "xterm-256color" | |
#----------------------------------------------------------------------------------------------------------------------- | |
# | |
# Pipeline Jobs | |
# | |
#----------------------------------------------------------------------------------------------------------------------- | |
jobs: | |
#--------------------------------------------------------------------------------------------------------------------- | |
# | |
# LINUX | |
# | |
#--------------------------------------------------------------------------------------------------------------------- | |
Linux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
container: | |
- "alpine-3.15" | |
- "alpine-3.14" | |
- "archlinux" | |
- "centos-7" | |
- "debian-11" | |
- "debian-10" | |
- "fedora-35" | |
- "fedora-33" | |
- "gentoo" | |
- "rocky-8" | |
- "ubuntu-20.04" | |
- "ubuntu-18.04" | |
steps: | |
- name: Log in to the Container registry | |
uses: docker/login-action@v1.12.0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.CICD_TOKEN }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Docker | |
run: make docker-${{ matrix.container }} pull=1 push=1 | |
- name: Lint | |
run: make dlint-${{ matrix.container }} | |
- name: Test | |
run: make dtest-${{ matrix.container }} sudo=1 mountns=1 failfast=1 failures=5 jobs=$(nproc) progress=0 exclude=docker | |
- name: Archive test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.container }} | |
path: .work/docker/${{ matrix.container }}/** | |
#--------------------------------------------------------------------------------------------------------------------- | |
# | |
# MacOS | |
# | |
#--------------------------------------------------------------------------------------------------------------------- | |
MacOS: | |
strategy: | |
fail-fast: true | |
matrix: | |
os: ["12"] | |
runs-on: macos-${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Dependencies | |
run: | | |
# Brew is so dumb. Trying to install git fails because both 2.35 and 2.36 are available and installing the | |
# newer one causes a symlink collision. So we just work around this be removing the old one if it is | |
# present. | |
brew unlink git@2.35.1 || true | |
install/all | |
- name: Lint | |
run: make lint | |
# Run all unit tests. We exclude docker tests for Darwin for our CI/CD pipeline as they don't run successfully | |
# inside GitHub actions though they run perfectly fine locally. | |
- name: Test | |
run: make test failfast=1 failures=5 jobs=$(nproc) progress=0 exclude=docker | |
- name: Archive test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: macos-${{ matrix.os }} | |
path: .work/** | |
#--------------------------------------------------------------------------------------------------------------------- | |
# | |
# Test Results | |
# | |
#--------------------------------------------------------------------------------------------------------------------- | |
test-results: | |
name: "Tests Results" | |
needs: [Linux, MacOS] | |
runs-on: ubuntu-latest | |
if: always() && github.ref != 'refs/heads/develop' | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Details | |
run: find artifacts | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1.6 | |
with: | |
check_name: Publish Test Results | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
files: artifacts/**/etest.xml | |
#--------------------------------------------------------------------------------------------------------------------- | |
# | |
# Release | |
# | |
#--------------------------------------------------------------------------------------------------------------------- | |
release: | |
name: "Release" | |
needs: [Linux, MacOS] | |
runs-on: ubuntu-latest | |
if: success() && github.ref == 'refs/heads/develop' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.CICD_TOKEN }} | |
- name: Version | |
run: | | |
# Setup Git so we can commit | |
git config user.name "github-actions" | |
git config user.email "github-actions@github.com" | |
# Increment and push new version | |
bin/ebash cicd_create_next_version_tag --push | |
- name: Release | |
run: bin/ebash cicd_release |