Skip to content

Commit

Permalink
use docker containers for all linux workflow runs
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeepee committed Oct 16, 2023
1 parent 905484c commit f7f1e60
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 48 deletions.
1 change: 1 addition & 0 deletions .github/workflows/agent-language-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/direct-message-language-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/file-storage-language-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down Expand Up @@ -63,6 +64,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration_js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/p-diff-sync-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down Expand Up @@ -46,6 +47,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down Expand Up @@ -91,6 +93,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down Expand Up @@ -137,6 +140,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down Expand Up @@ -183,6 +187,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down Expand Up @@ -230,6 +235,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down Expand Up @@ -276,6 +282,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down Expand Up @@ -322,6 +329,7 @@ jobs:
strategy:
matrix:
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down
108 changes: 87 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
create-release:
runs-on: self-hosted
container: "ubuntu:22.04"
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}

Expand Down Expand Up @@ -38,11 +39,12 @@ jobs:
draft: true
prerelease: false

build-launcher-binary:
build-launcher-binary-linux:
strategy:
fail-fast: false
matrix:
platform: [self-hosted, macos-latest, windows-latest]
platform: [self-hosted]
container: ["ubuntu:22.04"]
node-version: [18.17.0]

needs:
Expand Down Expand Up @@ -78,14 +80,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf protobuf-compiler
- name: install dependencies (macos only)
if: matrix.platform == 'macos-latest'
run: brew install protobuf cmake

- name: install dependencies (windows only)
if: matrix.platform == 'windows-latest'
run: choco install protoc cmake

- name: get version
run: echo "PACKAGE_VERSION=$(node -p "require('./ui/package.json').version")" >> $GITHUB_ENV

Expand Down Expand Up @@ -114,15 +108,6 @@ jobs:
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
run: yarn run package-ad4m

- name: Build AD4M-CLI & build Launcher binary (windows-latest)
if: matrix.platform == 'windows-latest'
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
run: |
choco install curl cygwin gnuwin32-m4 libgcc make mingw
yarn run package-ad4m
- name: Upload Release Deb Asset
id: upload-release-deb-asset
if: matrix.platform == 'self-hosted'
Expand All @@ -149,7 +134,7 @@ jobs:

- name: Upload Release AppImage Update Asset
id: upload-release-appimage-asset-update
if: matrix.platform == 'ubuntu-latest'
if: matrix.platform == 'self-hosted'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -161,7 +146,7 @@ jobs:

- name: Upload Release AppImage update sig Asset
id: upload-release-appimage-asset-update-sig
if: matrix.platform == 'ubuntu-latest'
if: matrix.platform == 'self-hosted'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -183,6 +168,85 @@ jobs:
asset_name: ad4m-linux-${{ steps.extract_version.outputs.version }}-x64
asset_content_type: application/octet-stream

build-launcher-binary-others:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, windows-latest]
node-version: [18.17.0]

needs:
- create-release
- npm-publish

runs-on: ${{ matrix.platform }}

steps:
- name: Fetch source code
uses: actions/checkout@v2

- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
override: true
toolchain: 1.71.1

- name: Install GO
uses: actions/setup-go@v4
with:
go-version: '1.18'

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.32.4
- run: rustup target add wasm32-unknown-unknown

- name: install dependencies (macos only)
if: matrix.platform == 'macos-latest'
run: brew install protobuf cmake

- name: install dependencies (windows only)
if: matrix.platform == 'windows-latest'
run: choco install protoc cmake

- name: get version
run: echo "PACKAGE_VERSION=$(node -p "require('./ui/package.json').version")" >> $GITHUB_ENV

- name: Extract version
id: extract_version
uses: Saionaro/[email protected]
with:
path: ui

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Yarn Install
run: yarn install

- name: Build AD4M-CLI & build Launcher binary (macos/linux-latest)
if: matrix.platform != 'windows-latest'
env:
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
run: yarn run package-ad4m

- name: Build AD4M-CLI & build Launcher binary (windows-latest)
if: matrix.platform == 'windows-latest'
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
run: |
choco install curl cygwin gnuwin32-m4 libgcc make mingw
yarn run package-ad4m
- name: Upload Release Macos Asset
id: upload-release-macos-asset
if: matrix.platform == 'macos-latest'
Expand Down Expand Up @@ -281,6 +345,7 @@ jobs:

npm-publish:
runs-on: self-hosted
container: "ubuntu:22.04"
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
Expand Down Expand Up @@ -331,6 +396,7 @@ jobs:

crates-publish:
runs-on: self-hosted
container: "ubuntu:22.04"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand Down
Loading

0 comments on commit f7f1e60

Please sign in to comment.