Skip to content

Commit

Permalink
REMOVE
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Nov 1, 2024
1 parent f4b06a5 commit d7676fd
Showing 1 changed file with 64 additions and 65 deletions.
129 changes: 64 additions & 65 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Continuous integration

on:
push:
branches: master
pull_request:
branches: master
workflow_dispatch: # allows manual triggering
Expand All @@ -15,60 +14,60 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
test-nixpkgs:
name: Build & Test - Nixpkgs - ${{ matrix.bzlmodEnabled && 'bzlmod' || 'workspace' }} ${{ matrix.withNixRemote && '- NixRemote ' || '' }}- ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-12
bzlmodEnabled:
- true
- false
withNixRemote:
- true
- false
exclude:
# skip nix remote jobs on MacOS
- os: macos-12
withNixRemote: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=./docs/nixpkgs.nix
- uses: ./.github/actions/configure_bazelrc
with:
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
- name: Start remote Nix server
if: matrix.withNixRemote
run: |
# Generate temporary SSH keys.
mkdir -p $HOME/.ssh
mkdir -p .github/nix-server/keys
ssh-keygen -t ed25519 -f .github/nix-server/keys/ci -C ci-nix-server -q -N ""
docker build -t nix-server -f .github/nix-server/Dockerfile .
docker run -d -p 2222:22 nix-server
cp .github/nix-server/keys/* $HOME/.ssh/
sudo cp .github/nix-server/config /etc/ssh/ssh_config
echo "Setting BAZEL_NIX_REMOTE env variable"
echo BAZEL_NIX_REMOTE=nix-server >> "$GITHUB_ENV"
- name: Build & test
env:
BZLMOD_ENABLED: ${{ matrix.bzlmodEnabled }}
run: |
nix-shell --pure \
--keep GITHUB_STEP_SUMMARY \
--keep GITHUB_REPOSITORY \
--keep BZLMOD_ENABLED \
--keep BAZEL_NIX_REMOTE \
--run 'bash .github/build-and-test'
# test-nixpkgs:
# name: Build & Test - Nixpkgs - ${{ matrix.bzlmodEnabled && 'bzlmod' || 'workspace' }} ${{ matrix.withNixRemote && '- NixRemote ' || '' }}- ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os:
# - ubuntu-latest
# - macos-12
# bzlmodEnabled:
# - true
# - false
# withNixRemote:
# - true
# - false
# exclude:
# # skip nix remote jobs on MacOS
# - os: macos-12
# withNixRemote: true
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# - uses: cachix/install-nix-action@v30
# with:
# nix_path: nixpkgs=./docs/nixpkgs.nix
# - uses: ./.github/actions/configure_bazelrc
# with:
# buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
# - name: Start remote Nix server
# if: matrix.withNixRemote
# run: |
# # Generate temporary SSH keys.
# mkdir -p $HOME/.ssh
# mkdir -p .github/nix-server/keys
# ssh-keygen -t ed25519 -f .github/nix-server/keys/ci -C ci-nix-server -q -N ""

# docker build -t nix-server -f .github/nix-server/Dockerfile .
# docker run -d -p 2222:22 nix-server

# cp .github/nix-server/keys/* $HOME/.ssh/

# sudo cp .github/nix-server/config /etc/ssh/ssh_config

# echo "Setting BAZEL_NIX_REMOTE env variable"
# echo BAZEL_NIX_REMOTE=nix-server >> "$GITHUB_ENV"
# - name: Build & test
# env:
# BZLMOD_ENABLED: ${{ matrix.bzlmodEnabled }}
# run: |
# nix-shell --pure \
# --keep GITHUB_STEP_SUMMARY \
# --keep GITHUB_REPOSITORY \
# --keep BZLMOD_ENABLED \
# --keep BAZEL_NIX_REMOTE \
# --run 'bash .github/build-and-test'
test-examples:
name: Build & Test - Examples
strategy:
Expand Down Expand Up @@ -158,13 +157,13 @@ jobs:
working-directory: examples/flakes
run: bazel run --crosstool_top=@nixpkgs_config_cc//:toolchain :hello

all_ci_tests:
runs-on: ubuntu-latest
needs:
- test-nixpkgs
- test-examples
if: ${{ always() }}
steps:
- uses: cgrindel/gha_join_jobs@794a2d117251f22607f1aab937d3fd3eaaf9a2f5 # v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# all_ci_tests:
# runs-on: ubuntu-latest
# needs:
# - test-nixpkgs
# - test-examples
# if: ${{ always() }}
# steps:
# - uses: cgrindel/gha_join_jobs@794a2d117251f22607f1aab937d3fd3eaaf9a2f5 # v1
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d7676fd

Please sign in to comment.