mirror of
https://github.com/actions/cache.git
synced 2026-06-14 17:04:10 +08:00
Compare commits
1 Commits
f82c03faa8
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
745332c95a |
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v4
|
||||||
# Override language selection by uncommenting this and choosing your languages
|
# Override language selection by uncommenting this and choosing your languages
|
||||||
# with:
|
# with:
|
||||||
# languages: go, javascript, csharp, python, cpp, java, ruby
|
# languages: go, javascript, csharp, python, cpp, java, ruby
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below).
|
# If this step fails, then you should remove it and run the build manually (see below).
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v3
|
uses: github/codeql-action/autobuild@v4
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
@@ -42,4 +42,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v4
|
||||||
|
|||||||
69
examples.md
69
examples.md
@@ -621,75 +621,6 @@ whenever possible:
|
|||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Multiple OS with a build matrix
|
|
||||||
|
|
||||||
```yml
|
|
||||||
name: CI
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
tests:
|
|
||||||
name: Test ${{ matrix.os }}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
SEP: /
|
|
||||||
PIP_WHEELS_DIR: ~/.cache/pip
|
|
||||||
CARGO_INDEX_DIR: ~/.cargo/git
|
|
||||||
CARGO_REGISTRY_DIR: ~/.cargo/registry
|
|
||||||
|
|
||||||
- os: macos-latest
|
|
||||||
SEP: /
|
|
||||||
PIP_WHEELS_DIR: ~/Library/Caches/pip
|
|
||||||
CARGO_INDEX_DIR: ~/.cargo/git
|
|
||||||
CARGO_REGISTRY_DIR: ~/.cargo/registry
|
|
||||||
|
|
||||||
- os: windows-latest
|
|
||||||
SEP: \
|
|
||||||
PIP_WHEELS_DIR: ~\AppData\Local\pip\Cache
|
|
||||||
CARGO_INDEX_DIR: C:\Rust\.cargo\git
|
|
||||||
CARGO_REGISTRY_DIR: C:\Rust\.cargo\registry
|
|
||||||
|
|
||||||
# Keep running all matrices if something fail
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Cache pip wheels
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ${{ matrix.PIP_WHEELS_DIR }}
|
|
||||||
key: ${{ runner.os }}-pip-wheels-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/setup.py') }}-14-
|
|
||||||
|
|
||||||
- name: Cache cargo index
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ${{ matrix.CARGO_INDEX_DIR }}
|
|
||||||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-14-
|
|
||||||
|
|
||||||
- name: Cache cargo registry
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ${{ matrix.CARGO_REGISTRY_DIR }}
|
|
||||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-14-
|
|
||||||
|
|
||||||
- name: Cache cargo target
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}${{ matrix.SEP }}target
|
|
||||||
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-14-
|
|
||||||
|
|
||||||
- name: Run on Windows
|
|
||||||
if: matrix.os == 'windows-latest'
|
|
||||||
run: echo Windows
|
|
||||||
|
|
||||||
- name: Run on Linux
|
|
||||||
if: matrix.os == 'ubuntu-latest'
|
|
||||||
run: echo Linux
|
|
||||||
```
|
|
||||||
|
|
||||||
## Scala - SBT
|
## Scala - SBT
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user