Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move glibc x86 Linux CI from CirrusCI to GitHub #4373

Merged
merged 25 commits into from
Aug 7, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ RUN apt-get update \
RUN curl --output cmake-3.25.1-linux-x86_64.sh https://cmake.org/files/v3.25/cmake-3.25.1-linux-x86_64.sh \
&& sh cmake-3.25.1-linux-x86_64.sh --prefix=/usr/local --exclude-subdir

# needed for GitHub actions
RUN git config --global --add safe.directory /__w/ponyc/ponyc

# add user pony in order to not run tests as root
RUN useradd -ms /bin/bash -d /home/pony -g root pony
RUN useradd -u 1001 -ms /bin/bash -d /home/pony -g root pony
USER pony
WORKDIR /home/pony
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ RUN apt-get update \
&& apt-get -y clean \
&& pip3 install cloudsmith-cli

# needed for GitHub actions
RUN git config --global --add safe.directory /__w/ponyc/ponyc

# add user pony in order to not run tests as root
RUN useradd -ms /bin/bash -d /home/pony -g root pony
RUN useradd -u 1001 -ms /bin/bash -d /home/pony -g root pony
USER pony
WORKDIR /home/pony
66 changes: 0 additions & 66 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ task:
timeout_in: 120m

matrix:
- name: "x86-64 Linux glibc"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
environment:
IMAGE: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
DEBUGGER: lldb
- name: "x86-64 Linux musl"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-musl-builder:20220807
Expand Down Expand Up @@ -291,20 +285,6 @@ task:
timeout_in: 120m

matrix:
- name: "nightly: x86-64-unknown-linux-ubuntu20.04"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu20.04-builder:20230115
environment:
IMAGE: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu20.04-builder:20230115
TRIPLE_VENDOR: unknown
TRIPLE_OS: linux-ubuntu20.04
- name: "nightly: x86-64-unknown-linux-ubuntu22.04"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
environment:
IMAGE: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
TRIPLE_VENDOR: unknown
TRIPLE_OS: linux-ubuntu22.04
- name: "nightly: x86-64-unknown-linux-musl"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-musl-builder:20220807
Expand Down Expand Up @@ -439,20 +419,6 @@ task:
timeout_in: 120m

matrix:
- name: "release: x86-64-unknown-linux-ubuntu20.04"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu20.04-builder:20230115
environment:
IMAGE: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu20.04-builder:20230115
TRIPLE_VENDOR: unknown
TRIPLE_OS: linux-ubuntu20.04
- name: "release: x86-64-unknown-linux-ubuntu22.04"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
environment:
IMAGE: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
TRIPLE_VENDOR: unknown
TRIPLE_OS: linux-ubuntu22.04
- name: "release: x86-64-unknown-linux-musl"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-musl-builder:20220807
Expand Down Expand Up @@ -586,22 +552,6 @@ task:
timeout_in: 120m

matrix:
- name: "Stress Test: x86-64-unknown-linux-ubuntu22.04 [release]"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
environment:
IMAGE: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
TARGET: test-stress-release
DEBUGGER: lldb
- name: "Stress Test: x86-64-unknown-linux-ubuntu22.04 [debug]"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
environment:
IMAGE: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
TARGET: test-stress-debug
DEBUGGER: lldb
depends_on:
- "Stress Test: x86-64-unknown-linux-ubuntu22.04 [release]"
- name: "Stress Test: x86-64-unknown-linux-musl [release]"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-musl-builder:20220807
Expand All @@ -618,22 +568,6 @@ task:
DEBUGGER: gdb
depends_on:
- "Stress Test: x86-64-unknown-linux-musl [release]"
- name: "Stress Test: x86-64-unknown-linux-ubuntu22.04 [cd] [release]"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
environment:
IMAGE: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
TARGET: test-stress-with-cd-release
DEBUGGER: lldb
- name: "Stress Test: x86-64-unknown-linux-ubuntu22.04 [cd] [debug]"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
environment:
IMAGE: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20220720
TARGET: test-stress-with-cd-debug
DEBUGGER: lldb
depends_on:
- "Stress Test: x86-64-unknown-linux-ubuntu22.04 [cd] [release]"
- name: "Stress Test: x86-64-unknown-linux-musl [cd] [release]"
container:
image: ponylang/ponyc-ci-x86-64-unknown-linux-musl-builder:20220807
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/nightlies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Nightlies

on:
schedule:
- cron: "0 0 * * *"

jobs:
x86_64-linux:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20230806
name: x86-64-unknown-linux-ubuntu22.04
triple-os: linux-ubuntu22.04
triple-vendor: unknown
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu20.04-builder:20230807
name: x86-64-unknown-linux-ubuntu20.04
triple-os: linux-ubuntu20.04
triple-vendor: unknown

name: ${{ matrix.name }}
container:
image: ${{ matrix.image }}
options: --user pony

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Libs
id: cache-libs
uses: actions/cache@v3
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Build Libs
if: steps.cache-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8
- name: Nightly
run: bash .ci-scripts/x86-64-nightly.bash
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
TRIPLE_VENDOR: ${{ matrix.triple-vendor }}
TRIPLE_OS: ${{ matrix.triple-os }}
- name: Send alert on failure
if: ${{ failure() }}
uses: zulip/github-actions-zulip@35d7ad8e98444f894dcfe1d4e17332581d28ebeb
with:
api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }}
email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }}
organization-url: 'https://ponylang.zulipchat.com/'
to: notifications
type: stream
topic: ${{ github.repository }} scheduled job failure
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.
38 changes: 38 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,41 @@ jobs:
- uses: actions/checkout@v2
- name: Verify CHANGELOG
run: changelog-tool verify

x86_64-linux:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20230806
name: x86-64 Linux glibc

name: ${{ matrix.name }}
container:
image: ${{ matrix.image }}
options: --user pony --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Libs
id: cache-libs
uses: actions/cache@v3
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Build Libs
if: steps.cache-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8
- name: Configure Debug Runtime
run: make configure arch=x86-64 config=debug
- name: Build Debug Runtime
run: make build config=debug
- name: Test with Debug Runtime
run: make test-ci config=debug usedebugger='lldb'
- name: Configure Release Runtime
run: make configure arch=x86-64 config=release
- name: Build Release Runtime
run: make build config=release
- name: Test with Release Runtime
run: make test-ci config=release usedebugger='lldb'
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release

on:
push:
tags:
- \d+.\d+.\d+

concurrency: release

jobs:
# validation to assure that we should in fact continue with the release should
# be done here. the primary reason for this step is to verify that the release
# was started correctly by pushing a `release-X.Y.Z` tag rather than `X.Y.Z`.
pre-artefact-creation:
name: Tasks to run before artefact creation
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v3
with:
ref: "main"
token: ${{ secrets.RELEASE_TOKEN }}
- name: Validate CHANGELOG
uses: ponylang/release-bot-action@0.6.1
with:
entrypoint: pre-artefact-changelog-check

x86_64-linux:
needs:
- pre-artefact-creation

runs-on: ubuntu-latest

strategy:
matrix:
include:
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20230806
name: x86-64-unknown-linux-ubuntu22.04
triple-os: linux-ubuntu22.04
triple-vendor: unknown
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu20.04-builder:20230807
name: x86-64-unknown-linux-ubuntu20.04
triple-os: linux-ubuntu20.04
triple-vendor: unknown

name: ${{ matrix.name }}
container:
image: ${{ matrix.image }}
options: --user pony

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Libs
id: cache-libs
uses: actions/cache@v3
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Build Libs
if: steps.cache-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8
- name: Release
run: bash .ci-scripts/x86-64-release.bash
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
TRIPLE_VENDOR: ${{ matrix.triple-vendor }}
TRIPLE_OS: ${{ matrix.triple-os }}
60 changes: 60 additions & 0 deletions .github/workflows/stress-test-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Nightlies

on:
schedule:
- cron: "30 2 * * *"

jobs:
x86_64-linux:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20230806
name: x86-64-unknown-linux-ubuntu22.04 [release]
target: test-stress-release
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20230806
name: x86-64-unknown-linux-ubuntu22.04 [debug]
target: test-stress-debug
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20230806
name: x86-64-unknown-linux-ubuntu22.04 [cd] [release]
target: test-stress-cd-release
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20230806
name: x86-64-unknown-linux-ubuntu22.04 [cd] [debug]
target: test-stress-cd-debug

name: ${{ matrix.name }}
container:
image: ${{ matrix.image }}
options: --user pony

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Libs
id: cache-libs
uses: actions/cache@v3
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Build Libs
if: steps.cache-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8
- name: Configure Debug Runtime
run: make configure config=debug
- name: Build Debug Runtime
run: make build config=debug
- name: Run Stress Test
run: make ${{ matrix.target }} config=debug usedebugger='lldb'
- name: Send alert on failure
if: ${{ failure() }}
uses: zulip/github-actions-zulip@35d7ad8e98444f894dcfe1d4e17332581d28ebeb
with:
api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }}
email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }}
organization-url: 'https://ponylang.zulipchat.com/'
to: notifications
type: stream
topic: ${{ github.repository }} scheduled job failure
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.
Loading