Skip to content

Commit

Permalink
misc(ci): divide into independent workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
himkt committed Dec 22, 2024
1 parent 323bc63 commit 5a524bb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/main.yml → .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
name: "build"

name: macOS test
on:
push:
branches:
- main
pull_request:

jobs:
main:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: uninstall builtin homebrew on macOS
if: matrix.os == 'macos-latest'
run: |
sudo rm -rf /opt/homebrew
- name: setup zsh for ubuntu-latest
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update -y
sudo apt install -y zsh
chsh -s $(which zsh)
- name: setup ${{ matrix.os }}
- name: setup dotfiles
run: |
cp -r $GITHUB_WORKSPACE $HOME/dotfiles
cd $HOME/dotfiles
Expand All @@ -36,7 +24,6 @@ jobs:
make brew-base
shell: zsh {0}
- name: brew doctor on macOS
if: matrix.os == 'macos-latest'
run: |
# NOTE(himkt); skip this on Ubuntu since brew doctor won't succeed
# due to the installation path.
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Ubuntu test
on:
push:
branches:
- main
pull_request:
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup zsh for ubuntu-latest
run: |
sudo apt update -y
sudo apt install -y zsh
chsh -s $(which zsh)
- name: setup dotfiles
run: |
cp -r $GITHUB_WORKSPACE $HOME/dotfiles
cd $HOME/dotfiles
make
make brew
- name: install packages
run: |
source $HOME/.zshrc
make brew-base
shell: zsh {0}

0 comments on commit 5a524bb

Please sign in to comment.