-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (41 loc) · 1.48 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: CI
on:
# pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Setup .env file
run: |
cp .devcontainer/.env.example .devcontainer/.env
sed -i "s/your_atcoder_username_here/${{ secrets.ATCODER_USERNAME }}/g" .devcontainer/.env
sed -i "s/your_atcoder_password_here/${{ secrets.ATCODER_PASSWORD }}/g" .devcontainer/.env
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and run Dev Container task
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/${{ github.repository }}
runCmd: |
# Testing "cargo_compete_new.sh"
cargo_compete_new.sh abc317
cd $WORKSPACE_FOLDER/src/contest/abc317/
$WORKSPACE_FOLDER/.github/scripts/overwrite_abc317_a_solution.sh src/bin/a.rs
cargo compete test a
# Testing "cargo compete add"
cargo_compete_new.sh practice
cd $WORKSPACE_FOLDER/src/contest/practice/
cargo compete add abc317_a
$WORKSPACE_FOLDER/.github/scripts/overwrite_abc317_a_solution.sh src/bin/abc317_a.rs
cargo compete test abc317_a