Skip to content

Commit

Permalink
build on stable
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Dec 29, 2023
1 parent e8e4151 commit edaff09
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 33 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install correct toolchain
shell: bash
run: |
if [[ ${{ github.event_name }} == 'schedule' ]]; then
RUST_TOOLCHAIN=nightly
else
RUST_TOOLCHAIN=$(cat rust-version)
fi
echo "Installing Rust version: $RUST_TOOLCHAIN"
rustup override set $RUST_TOOLCHAIN
- name: Show Rust version
run: |
rustup show
rustc -Vv
cargo -V
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable

- name: Build
run: RUSTFLAGS="-D warnings" cargo build --locked
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,14 @@ Make sure you have at least 1.5 GB free disk space.
```
4. *ff-node-monitor* is written in [Rust](https://www.rust-lang.org/) using
[Rocket](https://rocket.rs/), which means it needs a nightly version of Rust:
[Rocket](https://rocket.rs/). Any recent stable version of Rust should work:
```
curl https://sh.rustup.rs -sSf > rustup.sh
sudo -u ff-node-monitor sh rustup.sh --default-toolchain $(cat rust-version)
sudo -u ff-node-monitor sh rustup.sh
rm rustup.sh
```
The file `rust-version` always contains a tested nightly version number. If
you want the latest nightly version instead, just use `--default-toolchain
nightly`. However, the build might fail then.
5. Build *ff-node-monitor*:
```
Expand Down
1 change: 0 additions & 1 deletion rust-version

This file was deleted.

4 changes: 0 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

#![feature(proc_macro_hygiene, decl_macro, try_blocks)]
// FIXME: Diesel macros generate warnings
#![allow(proc_macro_derive_resolution_fallback)]

// FIXME: Get rid of the remaining `extern crate` once we can
#[macro_use]
extern crate diesel as diesel_macros;
Expand Down
8 changes: 4 additions & 4 deletions src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@ async fn run_action(
config: &State<Config>,
) -> Result<Template> {
// Determine and verify action
let action: Result<Action> = try {
let action: Result<Action> = (|| {
let signed_action = base64::decode(signed_action.as_str()).map_err(|e| Debug(e.into()))?;
let signed_action: SignedAction =
deserialize_from_slice(signed_action.as_slice()).map_err(|e| Debug(e.into()))?;
signed_action
Ok(signed_action
.verify(&config.secrets.action_signing_key)
.map_err(|e| Debug(e.into()))?
};
.map_err(|e| Debug(e.into()))?)
})();
let action = match action {
Ok(a) => a,
Err(_) => return Ok(renderer.render("run_action_error", json!({}))?),
Expand Down

0 comments on commit edaff09

Please sign in to comment.