mirror of
https://github.com/oxalica/rust-overlay.git
synced 2025-10-06 00:02:40 +02:00
ci: update dependencies and simplify
This commit is contained in:
47
.github/workflows/ci.yaml
vendored
47
.github/workflows/ci.yaml
vendored
@@ -5,15 +5,6 @@ on:
|
||||
branches:
|
||||
- master
|
||||
- dev
|
||||
- ci
|
||||
|
||||
workflow_run:
|
||||
workflows:
|
||||
- sync-channels
|
||||
types:
|
||||
- completed
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
flake-check:
|
||||
@@ -22,17 +13,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # Nix Flakes doesn't work on shallow clones
|
||||
uses: actions/checkout@v3.0.2
|
||||
|
||||
- name: Install Nix (flakes, nixpkgs-unstable)
|
||||
uses: cachix/install-nix-action@v16
|
||||
with:
|
||||
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
nix_path: nixpkgs=channel:nixpkgs-unstable
|
||||
uses: cachix/install-nix-action@v17
|
||||
|
||||
- name: Check flake
|
||||
run: nix flake check -v --show-trace --no-update-lock-file
|
||||
@@ -43,15 +27,12 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3.0.2
|
||||
|
||||
- name: Install python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v17
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install python packages
|
||||
run: pip3 install -r ./scripts/requirements.txt
|
||||
nix_path: nixpkgs=channel:nixpkgs-unstable
|
||||
|
||||
- name: Clean the latest version of each channel
|
||||
run: |
|
||||
@@ -67,15 +48,15 @@ jobs:
|
||||
done
|
||||
|
||||
- name: Re-fetch latest stable
|
||||
run: python3 ./scripts/fetch.py stable
|
||||
run: ./scripts/fetch.py stable
|
||||
|
||||
- name: Re-fetch latest beta
|
||||
run: python3 ./scripts/fetch.py beta
|
||||
run: ./scripts/fetch.py beta
|
||||
|
||||
- name: Re-fetch latest nightly
|
||||
run: python3 ./scripts/fetch.py nightly
|
||||
run: ./scripts/fetch.py nightly
|
||||
|
||||
- name: Check file changes
|
||||
- name: Verify file changes
|
||||
run: |
|
||||
short_status=$(git status --short)
|
||||
echo "$short_status"
|
||||
@@ -117,10 +98,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3.0.2
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v16
|
||||
uses: cachix/install-nix-action@v17
|
||||
with:
|
||||
nix_path: nixpkgs=channel:${{ matrix.nixpkgs-channel }}
|
||||
|
||||
@@ -165,10 +146,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3.0.2
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v16
|
||||
uses: cachix/install-nix-action@v17
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixpkgs-unstable
|
||||
|
||||
|
33
.github/workflows/sync-channels.yaml
vendored
33
.github/workflows/sync-channels.yaml
vendored
@@ -1,12 +1,10 @@
|
||||
name: sync-channels
|
||||
on:
|
||||
schedule:
|
||||
# The nightly channel is usually updated at 01:00:00 UTC.
|
||||
- cron: '0 2 * * *' # *-*-* 02:00:00 UTC
|
||||
# The nightly channel is usually updated at 01:00:00 UTC.
|
||||
- cron: '0 2 * * *' # *-*-* 02:00:00 UTC
|
||||
|
||||
push:
|
||||
branches:
|
||||
- trigger-sync
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync-channels:
|
||||
@@ -15,21 +13,12 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3.0.2
|
||||
with:
|
||||
ref: master
|
||||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
|
||||
|
||||
- name: Install python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install python packages
|
||||
run: pip3 install -r ./scripts/requirements.txt
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v16
|
||||
uses: cachix/install-nix-action@v17
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixpkgs-unstable
|
||||
|
||||
@@ -39,15 +28,15 @@ jobs:
|
||||
|
||||
- name: Sync stable channel
|
||||
timeout-minutes: 5
|
||||
run: python3 ./scripts/fetch.py stable
|
||||
run: ./scripts/fetch.py stable
|
||||
|
||||
- name: Sync beta channel
|
||||
timeout-minutes: 5
|
||||
run: python3 ./scripts/fetch.py beta
|
||||
run: ./scripts/fetch.py beta
|
||||
|
||||
- name: Sync nightly channel
|
||||
timeout-minutes: 5
|
||||
run: python3 ./scripts/fetch.py nightly
|
||||
run: ./scripts/fetch.py nightly
|
||||
|
||||
- name: Check and commit changes
|
||||
id: commit
|
||||
@@ -77,7 +66,5 @@ jobs:
|
||||
|
||||
- name: Push changes
|
||||
if: steps.commit.outcome == 'success'
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: master
|
||||
run: |
|
||||
git push master:master
|
||||
|
Reference in New Issue
Block a user