mirror of
https://github.com/julia-actions/julia-buildpkg.git
synced 2026-02-12 09:26:54 +08:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c59a056df | ||
|
|
fcafde1b68 | ||
|
|
252d4686a5 | ||
|
|
f813042500 | ||
|
|
139ec78da3 | ||
|
|
6d50efe063 | ||
|
|
f995fa4149 | ||
|
|
1b0a69ab74 | ||
|
|
69b7cba4e2 | ||
|
|
3240c50307 | ||
|
|
1b7e283276 | ||
|
|
fb1158438d |
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* @julia-actions/reviewers
|
||||||
33
.github/workflows/backup.yml
vendored
Normal file
33
.github/workflows/backup.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: Backup
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '5 4 * * 0'
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
backup:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Configure cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{ env.GITHUB_WORKSPACE }}
|
||||||
|
~/.cache/restic
|
||||||
|
key: ${{ runner.os }}
|
||||||
|
|
||||||
|
- name: Install the correct Python version
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
|
||||||
|
- name: Run backup action
|
||||||
|
uses: julia-actions/restic-action@main
|
||||||
|
env: # Options: https://restic.readthedocs.io/en/latest/040_backup.html#environment-variables
|
||||||
|
RESTIC_REPOSITORY: b2:${{ secrets.B2_BUCKET }}:${{ github.repository }}
|
||||||
|
RESTIC_PASSWORD: ${{ secrets.RESTIC_PASSWORD }}
|
||||||
|
B2_ACCOUNT_ID: ${{ secrets.B2_ACCOUNT_ID }}
|
||||||
|
B2_ACCOUNT_KEY: ${{ secrets.B2_ACCOUNT_KEY }}
|
||||||
86
.github/workflows/ci.yml
vendored
Normal file
86
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
- "master"
|
||||||
|
paths-ignore:
|
||||||
|
- "README.md"
|
||||||
|
- "LICENSE"
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- "README.md"
|
||||||
|
- "LICENSE"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version:
|
||||||
|
- "1.0"
|
||||||
|
- "1" # automatically expands to the latest stable 1.x release of Julia
|
||||||
|
- nightly
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- macOS-latest
|
||||||
|
- windows-latest
|
||||||
|
arch:
|
||||||
|
- x64
|
||||||
|
- x86
|
||||||
|
pkg-server:
|
||||||
|
- ""
|
||||||
|
- "pkg.julialang.org"
|
||||||
|
# 32-bit Julia binaries are not available on macOS
|
||||||
|
exclude:
|
||||||
|
- os: macOS-latest
|
||||||
|
arch: x86
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Example.jl
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: julia-actions/Example.jl
|
||||||
|
|
||||||
|
- name: Verify that test output file does not exist yet
|
||||||
|
run: test ! -f "$HOME/julia-buildpkg"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Checkout julia-buildpkg
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: ./.github/actions/julia-buildpkg
|
||||||
|
|
||||||
|
- uses: julia-actions/setup-julia@v1
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
arch: ${{ matrix.arch }}
|
||||||
|
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
env:
|
||||||
|
cache-name: cache-artifacts
|
||||||
|
with:
|
||||||
|
path: ~/.julia/artifacts
|
||||||
|
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-test-${{ env.cache-name }}-
|
||||||
|
${{ runner.os }}-test-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- uses: ./.github/actions/julia-buildpkg
|
||||||
|
env:
|
||||||
|
JULIA_PKG_SERVER: ${{ matrix.pkg-server }}
|
||||||
|
|
||||||
|
- uses: julia-actions/julia-runtest@v1
|
||||||
|
|
||||||
|
- uses: julia-actions/julia-processcoverage@v1
|
||||||
|
|
||||||
|
- uses: codecov/codecov-action@v1
|
||||||
|
with:
|
||||||
|
file: lcov.info
|
||||||
|
|
||||||
|
- name: Verify that test output file exists
|
||||||
|
run: test -f "$HOME/julia-buildpkg"
|
||||||
|
shell: bash
|
||||||
@@ -26,10 +26,10 @@ jobs:
|
|||||||
julia-arch: x86
|
julia-arch: x86
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1.0.0
|
- uses: actions/checkout@v2
|
||||||
- uses: julia-actions/setup-julia@latest
|
- uses: julia-actions/setup-julia@v1
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.julia-version }}
|
version: ${{ matrix.julia-version }}
|
||||||
- uses: julia-actions/julia-buildpkg@master
|
- uses: julia-actions/julia-buildpkg@v1
|
||||||
- uses: julia-actions/julia-runtest@master
|
- uses: julia-actions/julia-runtest@v1
|
||||||
```
|
```
|
||||||
|
|||||||
32
action.yml
32
action.yml
@@ -6,24 +6,22 @@ branding:
|
|||||||
icon: 'box'
|
icon: 'box'
|
||||||
color: 'gray-dark'
|
color: 'gray-dark'
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
project:
|
||||||
|
description: 'Value passed to the --project flag. The default value is the repository root: "@."'
|
||||||
|
default: '@.'
|
||||||
|
precompile:
|
||||||
|
description: 'Whether to allow auto-precompilation (via the `JULIA_PKG_PRECOMPILE_AUTO` env var). Options: yes | no. Default value: no.'
|
||||||
|
default: 'no'
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
# Occasionally, there are rather large delays (> a few hours)
|
- run: |
|
||||||
# between the time a package is registered in General and
|
import Pkg
|
||||||
# propagated to pkg.julialang.org. We can avoid this by manually
|
VERSION >= v"1.5-" && Pkg.Registry.add("General")
|
||||||
# cloning ~/.julia/registries/General/ in Julia 1.5 and later.
|
VERSION >= v"1.1.0-rc1" ? Pkg.build(verbose=true) : Pkg.build()
|
||||||
# See:
|
shell: julia --color=yes --project=${{ inputs.project }} {0}
|
||||||
# * https://github.com/JuliaLang/Pkg.jl/issues/2011
|
|
||||||
# * https://github.com/JuliaRegistries/General/issues/16777
|
|
||||||
# * https://github.com/JuliaPackaging/PkgServer.jl/issues/60
|
|
||||||
- run: julia --color=yes -e 'using Pkg; VERSION >= v"1.5-" && !isdir(joinpath(DEPOT_PATH[1], "registries", "General")) && Pkg.Registry.add("General")'
|
|
||||||
shell: bash
|
|
||||||
env:
|
env:
|
||||||
# We set `JULIA_PKG_SERVER` only for this step to enforce
|
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: "${{ env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE == '' && 'eager' || env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE }}"
|
||||||
# `Pkg.Registry.add` to use Git. This way, Pkg.jl can send
|
JULIA_PKG_PRECOMPILE_AUTO: "${{ inputs.precompile }}"
|
||||||
# the request metadata to pkg.julialang.org when installing
|
|
||||||
# packages via `Pkg.test`.
|
|
||||||
JULIA_PKG_SERVER: ""
|
|
||||||
- run: julia --color=yes --project -e 'using Pkg; if VERSION >= v"1.1.0-rc1"; Pkg.build(verbose=true); else Pkg.build(); end'
|
|
||||||
shell: bash
|
|
||||||
|
|||||||
Reference in New Issue
Block a user