Skip to content

Commit

Permalink
fix infra failures
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarTawfik committed Aug 21, 2024
1 parent fccfec5 commit 4f3e9f4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: "ci"

on:
# Run when invoked from other workflows:
workflow_call: {}

# Run using manual triggers from GitHub UI:
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch: {}

# Run on every pull request:
pull_request: {}

# Run on pushes to any branch except 'main', which is handled by the 'publish' workflow:
# Run on pushes to any branch except 'main', as we use a merge queue, and test PRs individually before merging them:
push:
branches-ignore:
- "main"
Expand All @@ -25,6 +22,11 @@ jobs:
ci:
runs-on: "ubuntu-22.04" # _SLANG_DEV_CONTAINER_BASE_IMAGE_ (keep in sync)

# Due to the "on" events above, this workflow will run on every push to any branch, and on every PR.
# This means that if a PR is created from a branch in the main repo, the CI jobs will run twice.
# This condition deduplicats it, so that it either runs on a push (to main repo or forks) or on a PR (from forks only).
if: "${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'NomicFoundation/slang') }}"

steps:
- name: "Checkout Repository"
uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332"
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ concurrency:
cancel-in-progress: false

jobs:
ci:
# Only run on the main repo (not forks), and only on the 'main' branch:
if: "${{ github.repository == 'NomicFoundation/slang' && github.ref_name == 'main' }}"
uses: "./.github/workflows/ci.yml"

publish:
runs-on: "ubuntu-22.04" # _SLANG_DEV_CONTAINER_BASE_IMAGE_ (keep in sync)
needs: "ci"

# Only run on the main repo (not forks), and only on the 'main' branch:
if: "${{ github.repository == 'NomicFoundation/slang' && github.ref_name == 'main' }}"

permissions:
contents: "write" # to create new branches and releases
Expand Down
3 changes: 0 additions & 3 deletions bin/hermit.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ env = {
"PATH": "${HERMIT_ENV}/scripts/bin:${PATH}",
"REPO_ROOT": "${HERMIT_ENV}",

// Python:
"LANG": "en_US.UTF-8",

// Rust:
"RUST_BACKTRACE": "full",
"RUST_STABLE_VERSION": "1.79.0", // __RUST_STABLE_VERSION_MARKER__ (keep in sync)
Expand Down

0 comments on commit 4f3e9f4

Please sign in to comment.