Skip to content

2.x: Dev mode working with Linux, enabling Macos13 #1

2.x: Dev mode working with Linux, enabling Macos13

2.x: Dev mode working with Linux, enabling Macos13 #1

name: '2.x: MacOS - Build ce_dev binaries, images and templates (devel)'
on:
push:
branches:
- 2.x-devel
pull_request:
types:
- opened
branches:
- 2.x-devel
jobs:
build:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
ref: '2.x-devel'
- name: Upgrade brew
run: |
rm -rf /usr/local/bin/2to3*
brew upgrade
brew update
brew upgrade
- name: Install homebrew dependencies
run: |
set -x
sudo chmod ugo+w /usr/local/bin
brew install docker docker-compose lima
- name: Install and start Colima
run: |
brew install colima
colima version
colima start --cpu 3 --memory 6 --disk 100 --vm-type=qemu --mount-type=sshfs --dns=1.1.1.1
colima restart
- name: Install modules
run: yarn
# Uses https://oclif.io/
# Not strictly necessary here, but ensures the packing works
- name: Pack the JS
run: yarn oclif pack tarballs --targets=darwin-x64,darwin-arm64 --no-xz
- name: Rename the dist/* files
run: yarn renamedist
# We build mkcert from source because releases are broken
- name: Install test dependencies
run: |
brew update
brew upgrade
brew install p7zip nss wget
cd /tmp
wget https://go.dev/dl/go1.22.1.darwin-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.1.darwin-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
sudo mv ./mkcert /usr/local/bin && cd ../
sudo chmod +x /usr/local/bin/mkcert
rm -Rf mkcert
- name: Build and test
run: |
/bin/sh docker-images/export.sh --version devel --image-name ce-dev --dockerfile-path base-devel
/bin/sh docker-images/export.sh --version devel --image-name ce-dev-controller --dockerfile-path controller-devel
sudo chmod +x bin/run.js
/bin/sh templates/prebuild.sh --template ce-dev-devel.compose.yml --version devel