chore: update some CI build jobs #158
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: build | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
workflow_dispatch: | |
jobs: | |
build-linux: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Build | |
run: make apply/user | |
build-wsl: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Build | |
run: | | |
./scripts/backup.sh ./modules/files/files.txt | |
nix run home-manager -- switch --flake '.#runner-wsl' | |
echo "✅ home-manager has been applied successfully!" | |
build-darwin: | |
runs-on: macos-14 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Build | |
# TODO: ignore exit status because this step is flaky in macOS | |
run: | | |
sudo mv /etc/nix/nix.conf /etc/nix/nix.conf.bk | |
make apply/darwin || \ | |
echo '❌ build-darwin job has failed.' >> $GITHUB_STEP_SUMMARY && \ | |
echo '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ github.job }}' >> $GITHUB_STEP_SUMMARY |