-
-
Notifications
You must be signed in to change notification settings - Fork 16
Add a GH workflow to update crates versions weekly #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Update crates versions | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
schedule: | ||
# * is a special character in YAML, needs quoting | ||
- cron: '0 0 * * 0' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
updateversions: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rust:latest | ||
dhovart marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@v2 | ||
dhovart marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
fetch-depth: 0 | ||
dhovart marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Retrieve newest versions of dependencies | ||
run: | | ||
echo 'cargo_toml<<EOF' >> $GITHUB_ENV | ||
./bin/update-crates-versions.sh | sed 's/"/\\"/g' >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- name: Update Cargo.toml | ||
run: | ||
echo "${{env.cargo_toml}}" > local-registry/Cargo.toml | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. @exercism/github-actions what do you think about this action? Note that you can also use the GitHub CLI, which comes pre-installed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, all right, I didn't know that the cli tools came pre-installed, I can create a PR this way if it's preferable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it might be slightly less susceptible to misuse (or errors) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wondering if that would actually work since I'm specifying container to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It won't. That said, it might be worth changing this workflow to be like https://github.com/exercism/rust/blob/main/.github/workflows/tests.yml#L113, which is the tests workflow for the rust repo. In it, the base image is ubuntu, but the But let's wait for @exercism/github-actions to see what they think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello, it's been a few months and I'd like to know why you stopped reviewing, it was nice contributing to exercism :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm really not the right person to review this, but at a guess, the people who'd been working with you on this PR got distracted and then just forgot. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm so sorry @dhovart! I guess @SaschaMann and I just forgot to review this. Our apologies. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, no worries at all :) |
||
with: | ||
commit-message: Update crates versions | ||
committer: GitHub <[email protected]> | ||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
branch: update-crates-version | ||
title: Update crates versions | ||
body: | | ||
Update crates versions | ||
|
||
This is an auto-generated pull request. |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
MANIFEST=local-registry/Cargo.toml | ||
DEP_LINE=$(grep -n "\[dependencies\]" $MANIFEST | cut -d : -f 1) | ||
DEPS=$(tail -n +$(($DEP_LINE + 1)) $MANIFEST) | ||
|
||
while IFS= read -r line | ||
do | ||
crate=$(echo "$line" | awk -F"[ ]+" '{print $1}') | ||
>&2 echo "Retrieving latest version of $crate..." | ||
latest_version=$(cargo search "$crate" | head -n 1 | awk -F"[ ]+" '{print $1 " = " $3}') | ||
sed -i -r "s/^$crate =.*/$latest_version/" $MANIFEST | ||
done <<< "$DEPS" | ||
|
||
cat $MANIFEST |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,234 @@ edition = "2021" | |
path = "dummy.rs" | ||
|
||
[dependencies] | ||
unicode-segmentation = "1.8.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's great to have the dependencies listed here explicitly 👍 |
||
chrono = "0.4.19" | ||
itertools = "0.10.3" | ||
rand = "0.8.4" | ||
regex = "1.5.4" | ||
lazy_static = "1.4.0" | ||
rayon = "1.5.1" | ||
time = "0.3.5" | ||
num = "0.4.0" | ||
unicode-reverse = "1.0.8" | ||
maplit = "1.0.2" | ||
crossbeam = "0.8.1" | ||
num-traits = "0.2.14" | ||
primes = "0.3.0" | ||
num-bigint = "0.4.3" | ||
modulo = "0.1.2" | ||
criterion = "0.3.5" | ||
num-integer = "0.1.44" | ||
crossbeam-utils = "0.8.5" | ||
bit-vec = "0.6.3" | ||
strum = "0.23.0" | ||
strum_macros = "0.23.1" | ||
primal = "0.3.0" | ||
once_cell = "1.8.0" | ||
failure = "0.1.8" | ||
counter = "0.5.2" | ||
permutator = "0.4.0" | ||
rstest = "0.11.0" | ||
crossbeam-channel = "0.5.1" | ||
bitflags = "1.3.2" | ||
permutohedron = "0.2.4" | ||
num-derive = "0.3.3" | ||
ndarray = "0.15.4" | ||
anyhow = "1.0.51" | ||
nom = "7.1.0" | ||
threadpool = "1.8.1" | ||
cached = "0.26.2" | ||
unicase = "2.6.0" | ||
phf = "0.10.0" | ||
libmath = "0.2.1" | ||
unicode-normalization = "0.1.19" | ||
rstest_reuse = "0.1.3" | ||
petgraph = "0.6.0" | ||
im = "15.0.0" | ||
hexlit = "0.5.3" | ||
enum-iterator = "0.7.0" | ||
boolinator = "2.4.0" | ||
uuid = "1.0.0-alpha.1" | ||
num_enum = "0.5.4" | ||
duplicate = "0.3.0" | ||
divrem = "1.0.0" | ||
pest = "2.1.3" | ||
modinverse = "0.1.1" | ||
dashmap = "4.0.2" | ||
bit-set = "0.5.2" | ||
bimap = "0.6.1" | ||
voca_rs = "1.14.0" | ||
unic-segment = "0.9.0" | ||
thiserror = "1.0.30" | ||
multiset = "0.0.5" | ||
kmp = "0.1.1" | ||
gcd = "2.0.2" | ||
fnv = "1.0.7" | ||
derivative = "2.2.0" | ||
ascii = "1.0.0" | ||
unicode_reader = "1.0.2" | ||
unic-char-range = "0.9.0" | ||
structopt = "0.3.25" | ||
scan_fmt = "0.2.6" | ||
pretty_assertions = "1.0.0" | ||
pest_derive = "2.1.0" | ||
multimap = "0.8.3" | ||
try_opt = "0.2.0" | ||
integer-sqrt = "0.1.5" | ||
int-enum = "0.4.0" | ||
indexmap = "1.7.0" | ||
hashers = "1.0.1" | ||
grapheme = "0.0.0" | ||
factorial = "0.2.1" | ||
eval = "0.4.3" | ||
derive_more = "0.99.17" | ||
counted-array = "0.1.2" | ||
case = "1.0.0" | ||
bitvec = "1.0.0-rc1" | ||
arrayvec = "0.7.2" | ||
Inflector = "0.11.4" | ||
watch = "0.2.0" | ||
stringsort = "2.0.0" | ||
serde = "1.0.130" | ||
rusqlite = "0.26.1" | ||
reikna = "0.12.3" | ||
modexp = "0.2.2" | ||
mod_exp = "1.0.1" | ||
lazysort = "0.2.1" | ||
evalexpr = "6.6.0" | ||
enumflags2 = "0.7.1" | ||
enum_derive = "0.1.7" | ||
custom_derive = "0.1.7" | ||
char_stream = "0.1.8" | ||
bytecount = "0.6.2" | ||
bencher = "0.1.5" | ||
unzip-n = "0.1.2" | ||
unic-normal = "0.9.0" | ||
transpose = "0.2.1" | ||
test-case = "1.2.1" | ||
subslice = "0.2.3" | ||
strfmt = "0.1.6" | ||
slow_primes = "0.1.14" | ||
serde_derive = "1.0.130" | ||
say-number = "1.0.0" | ||
rustversion = "1.0.6" | ||
rs_poker = "2.0.0-alpha.1" | ||
recur-fn = "2.2.0" | ||
readonly = "0.2.0" | ||
rand_chacha = "0.3.1" | ||
ramp = "0.6.0" | ||
quickcheck_macros = "1.0.0" | ||
quickcheck = "1.0.3" | ||
proptest = "1.0.0" | ||
prime_tools = "0.3.4" | ||
peg = "0.7.0" | ||
pcre = "0.2.3" | ||
ordered-float = "2.8.0" | ||
onig = "6.3.1" | ||
num_cpus = "1.13.0" | ||
luhn = "1.0.1" | ||
linked_hash_set = "0.1.4" | ||
linked-hash-map = "0.5.4" | ||
libm = "0.2.1" | ||
inflections = "1.1.1" | ||
indicatif = "0.17.0-beta.1" | ||
imageproc = "0.22.0" | ||
image = "0.23.14" | ||
if_chain = "1.0.2" | ||
hashbag = "0.1.4" | ||
generational-arena = "0.2.8" | ||
frunk = "0.4.0" | ||
factor = "0.4.0" | ||
enum-primitive-derive = "0.2.2" | ||
either = "1.6.1" | ||
digits_iterator = "0.1.0" | ||
csv = "1.1.6" | ||
conv = "0.3.3" | ||
compare = "0.1.0" | ||
char-iter = "0.1.0" | ||
caseless = "0.2.1" | ||
binomial-iter = "0.1.0" | ||
bigint = "4.4.3" | ||
bigdecimal = "0.3.0" | ||
async-std = "1.10.0" | ||
async-channel = "1.6.1" | ||
assert_float_eq = "1.1.3" | ||
array_tool = "1.0.3" | ||
z3 = "0.11.2" | ||
xvii = "0.4.1" | ||
workerpool = "1.2.0" | ||
unidecode = "0.3.0" | ||
unicode-case-mapping = "0.2.0" | ||
unic-langid = "0.9.0" | ||
tramp = "0.3.0" | ||
tinyset = "0.4.6" | ||
stringreader = "0.1.1" | ||
static_assertions = "1.1.0" | ||
spinning_top = "0.2.4" | ||
sparse-bitfield = "0.11.0" | ||
sliding_windows = "3.0.0" | ||
simplelog = "0.11.0" | ||
simple_parallel = "0.3.0" | ||
serial_test = "0.5.1" | ||
scoped_threadpool = "0.1.9" | ||
scoped-pool = "1.0.0" | ||
rustc-hash = "1.1.0" | ||
rug = "1.14.0" | ||
reduce = "0.1.4" | ||
queues = "1.1.0" | ||
pprof = "0.6.1" | ||
phf_macros = "0.10.0" | ||
pathfinding = "2.2.2" | ||
out = "6.1.0" | ||
numtoa = "0.2.4" | ||
num-format = "0.4.0" | ||
num-digitize = "0.4.2" | ||
mustache = "0.9.0" | ||
memoize = "0.1.9" | ||
macro-attr = "0.2.0" | ||
log = "0.4.14" | ||
lexical-sort = "0.3.1" | ||
left-pad = "1.0.1" | ||
lalrpop-util = "0.19.6" | ||
itoa = "0.4.8" | ||
indoc = "1.0.3" | ||
incremental-topo = "0.1.2" | ||
humantime = "2.1.0" | ||
hashbrown = "0.11.2" | ||
genawaiter = "0.99.1" | ||
futures-core = "0.3.18" | ||
free-ranges = "1.0.7" | ||
foreach = "0.3.0" | ||
fluent = "0.16.0" | ||
flamer = "0.4.0" | ||
flame = "0.2.2" | ||
flagset = "0.4.2" | ||
fixedbitset = "0.4.0" | ||
fasteval = "0.2.4" | ||
fancy-regex = "0.7.1" | ||
failure_derive = "0.1.8" | ||
enumset = "1.0.8" | ||
enum-utils = "0.1.2" | ||
encode_unicode = "0.3.6" | ||
easybench = "1.1.0" | ||
divisors = "0.2.1" | ||
dia-time = "6.1.0" | ||
deunicode = "1.3.1" | ||
defaultmap = "0.5.0" | ||
cranelift-simplejit = "0.68.0" | ||
cranelift-module = "0.78.0" | ||
cranelift = "0.78.0" | ||
cow-utils = "0.1.2" | ||
convert_case = "0.4.0" | ||
const_fn_assert = "0.1.2" | ||
clap = "3.0.0-beta.5" | ||
chomp = "0.3.1" | ||
chashmap = "2.2.2" | ||
change-case = "0.2.0" | ||
cast = "0.3.0" | ||
case_insensitive_hashmap = "1.0.0" | ||
bstr = "0.2.17" | ||
binary-heap-plus = "0.4.1" | ||
as-slice = "0.2.1" | ||
arr_macro = "0.1.3" | ||
alloc_counter = "0.0.4" |
Uh oh!
There was an error while loading. Please reload this page.